Fedora Account System
Red Hat Associate
Red Hat Customer
Spec URL: https://nonamedotc.fedorapeople.org/pkgreview/python-packages/python-qstylizer/python-qstylizer.spec SRPM URL: https://nonamedotc.fedorapeople.org/pkgreview/python-packages/python-qstylizer/python-qstylizer-0.2.0-1.fc34.src.rpm Description: qstylizer is a python package designed to help with the construction of PyQt/PySide stylesheets. Fedora Account System Username: nonamedotc
koji scratch build - https://koji.fedoraproject.org/koji/taskinfo?taskID=70998825
First few notes: PyPI URL does not work because they do not publish sdist tarball to PyPI. Their wheel is universal so this should not cause any troubles. I wanted to ask you whether you considered new pyproject macros but now I see that upstream metadata requires old versions of dependencies like pytest >= 4, < 5 or pytest-mock >= 1.6, < 2. If tests work with the latest components from rawhide, could you please open an upstream issue? You can take a look at the new macros and use some of them: https://src.fedoraproject.org/rpms/pyproject-rpm-macros %python_provide macro is deprecated. All provides should be generated automatically but if you need to specify them manually, use %py_provides, see https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_the_py_provides_macro
I'd add %doc README.rst into %files. Manual Requires are not necessary because they are also generated from upstream metadata: rpm -q --requires results/python3-qstylizer-0.2.0-1.fc35.noarch.rpm (python3.10dist(inflection) < 1 with python3.10dist(inflection) > 0.3) (python3.10dist(tinycss2) < 2 with python3.10dist(tinycss2) >= 0.5) python(abi) = 3.10 python3dist(inflection) python3dist(tinycss2) rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PartialHardlinkSets) <= 4.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(PayloadIsZstd) <= 5.4.18-1 rpmlib(RichDependencies) <= 4.12.0-1
(In reply to Lumír Balhar from comment #2) > First few notes: > > PyPI URL does not work because they do not publish sdist tarball to PyPI. > Their wheel is universal so this should not cause any troubles. > > I wanted to ask you whether you considered new pyproject macros but now I > see that upstream metadata requires old versions of dependencies like pytest > >= 4, < 5 or pytest-mock >= 1.6, < 2. If tests work with the latest > components from rawhide, could you please open an upstream issue? > You can take a look at the new macros and use some of them: > https://src.fedoraproject.org/rpms/pyproject-rpm-macros > I tried and got this - ERROR:root:Error parsing Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/pbr/core.py", line 96, in pbr attrs = util.cfg_to_args(path, dist.script_args) File "/usr/lib/python3.10/site-packages/pbr/util.py", line 271, in cfg_to_args pbr.hooks.setup_hook(config) File "/usr/lib/python3.10/site-packages/pbr/hooks/__init__.py", line 25, in setup_hook metadata_config.run() File "/usr/lib/python3.10/site-packages/pbr/hooks/base.py", line 27, in run self.hook() File "/usr/lib/python3.10/site-packages/pbr/hooks/metadata.py", line 25, in hook self.config['version'] = packaging.get_version( File "/usr/lib/python3.10/site-packages/pbr/packaging.py", line 874, in get_version raise Exception("Versioning for this project requires either an sdist" Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name qstylizer was given, but was not able to be found. error in setup command: Error parsing /builddir/build/BUILD/qstylizer-0.2.0/setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name qstylizer was given, but was not able to be found. This is my spec - #################################### BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros %generate_buildrequires %pyproject_buildrequires -r %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %autosetup -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build export PBR_VERSION=%{version} %pyproject_wheel %install export PBR_VERSION=%{version} %pyproject_install %pyproject_save_files qstylizer _qstylizer %check %tox %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE.txt #################################### I have this "export PBR_VERSION=%{version}" in my spec for qstylizer to build. How do I do that with pyproject macros?
Created attachment 1796117 [details] new spec The reason for this error is that %pyproject_buildrequires reads project's metadata and therefore needs to have PBR_VERSION set as well. While I was trying to fix the issue I've fixed also some of them mentioned above, here is my full specfile. Feel free to update it as you wish, test it and upload it back. Fixed: - %generate_buildrequires after %prep where it's actually executed - %pytest instead of %tox - see the upstream issue https://github.com/blambright/qstylizer/issues/11 - test dependencies specified manually instead of %pyproject_buildrequires -r -x test - also described upstream - readme in doc
Updated SPEC URL: https://nonamedotc.fedorapeople.org/pkgreview/python-packages/python-qstylizer/python-qstylizer.spec Updated SRPM URL: https://nonamedotc.fedorapeople.org/pkgreview/python-packages/python-qstylizer/python-qstylizer-0.2.0-2.fc34.src.rpm
koji scratch build - https://koji.fedoraproject.org/koji/taskinfo?taskID=71097737
Thank you for the changes. I have them in the spec now.
Package is APPROVED Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated [ ] = Manual review needed ===== MUST items ===== Generic: [x]: Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines. [x]: License field in the package spec file matches the actual license. Note: Checking patched sources after %prep for licenses. Licenses found: "Unknown or generated", "Expat License", "*No copyright* Expat License". 37 files have unknown license. Detailed output of licensecheck in /home/lbalhar/temp/reviews/1977120-python- qstylizer/licensecheck.txt [x]: Package contains no bundled libraries without FPC exception. [x]: Changelog in prescribed format. [x]: Sources contain only permissible code or content. [-]: Package contains desktop file if it is a GUI application. [-]: Development files must be in a -devel package [x]: Package uses nothing in %doc for runtime. [x]: Package consistently uses macros (instead of hard-coded directory names). [x]: Package is named according to the Package Naming Guidelines. [x]: Package does not generate any conflict. [x]: Package obeys FHS, except libexecdir and /usr/target. [-]: If the package is a rename of another package, proper Obsoletes and Provides are present. [x]: Requires correct, justified where necessary. [x]: Spec file is legible and written in American English. [-]: Package contains systemd file(s) if in need. [x]: Package is not known to require an ExcludeArch tag. [x]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 10240 bytes in 1 files. [x]: Package complies to the Packaging Guidelines [x]: Package successfully compiles and builds into binary rpms on at least one supported primary architecture. [x]: Package installs properly. [x]: Rpmlint is run on all rpms the build produces. Note: There are rpmlint messages (see attachment). [x]: If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package is included in %license. [x]: Package requires other packages for directories it uses. [x]: Package must own all directories that it creates. [x]: Package does not own files or directories owned by other packages. [x]: Package uses either %{buildroot} or $RPM_BUILD_ROOT [x]: Package does not run rm -rf %{buildroot} (or $RPM_BUILD_ROOT) at the beginning of %install. [x]: Macros in Summary, %description expandable at SRPM build time. [x]: Dist tag is present. [x]: Package does not contain duplicates in %files. [x]: Permissions on files are set properly. [x]: Package must not depend on deprecated() packages. [x]: Package use %makeinstall only when make install DESTDIR=... doesn't work. [x]: Package is named using only allowed ASCII characters. [x]: Package does not use a name that already exists. [x]: Package is not relocatable. [x]: Sources used to build the package match the upstream source, as provided in the spec URL. [x]: Spec file name must match the spec package %{name}, in the format %{name}.spec. [x]: File names are valid UTF-8. [x]: Packages must not store files under /srv, /opt or /usr/local Python: [x]: Python eggs must not download any dependencies during the build process. [x]: A package which is used by another package via an egg interface should provide egg info. [x]: Package meets the Packaging Guidelines::Python [x]: Package contains BR: python2-devel or python3-devel [x]: Packages MUST NOT have dependencies (either build-time or runtime) on packages named with the unversioned python- prefix unless no properly versioned package exists. Dependencies on Python packages instead MUST use names beginning with python2- or python3- as appropriate. [x]: Python packages must not contain %{pythonX_site(lib|arch)}/* in %files [x]: Binary eggs must be removed in %prep ===== SHOULD items ===== Generic: [-]: If the source package does not include license text(s) as a separate file from upstream, the packager SHOULD query upstream to include it. [x]: Final provides and requires are sane (see attachments). [x]: Package functions as described. [x]: Latest version is packaged. [x]: Package does not include license text files separate from upstream. [-]: Sources are verified with gpgverify first in %prep if upstream publishes signatures. Note: gpgverify is not used. [-]: Description and summary sections in the package spec file contains translations for supported Non-English languages, if available. [x]: Package should compile and build into binary rpms on all supported architectures. [x]: %check is present and all tests pass. [x]: Packages should try to preserve timestamps of original installed files. [x]: Reviewer should test that the package builds in mock. [x]: Buildroot is not present [x]: Package has no %clean section with rm -rf %{buildroot} (or $RPM_BUILD_ROOT) [x]: No file requires outside of /etc, /bin, /sbin, /usr/bin, /usr/sbin. [x]: Packager, Vendor, PreReq, Copyright tags should not be in spec file [x]: Sources can be downloaded from URI in Source: tag [x]: SourceX is a working URL. [x]: Spec use %global instead of %define unless justified. ===== EXTRA items ===== Generic: [x]: Rpmlint is run on all installed packages. Note: There are rpmlint messages (see attachment). [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Checking: python3-qstylizer-0.2.0-2.fc35.noarch.rpm python-qstylizer-0.2.0-2.fc35.src.rpm python3-qstylizer.noarch: W: spelling-error Summary(en_US) stylesheet -> style sheet, style-sheet, stylishness python3-qstylizer.noarch: W: spelling-error %description -l en_US stylesheets -> style sheets, style-sheets, dustsheets python-qstylizer.src: W: spelling-error Summary(en_US) stylesheet -> style sheet, style-sheet, stylishness python-qstylizer.src: W: spelling-error %description -l en_US stylesheets -> style sheets, style-sheets, dustsheets 2 packages and 0 specfiles checked; 0 errors, 4 warnings. Rpmlint (installed packages) ---------------------------- Cannot parse rpmlint output: Source checksums ---------------- https://github.com/blambright/qstylizer/archive/refs/tags/0.2.0.tar.gz#/qstylizer-0.2.0.tar.gz : CHECKSUM(SHA256) this package : 344fef12a7ac2546853ffdf1ef7055aea3b50e41cf469caf71eb4d2acabf42d7 CHECKSUM(SHA256) upstream package : 344fef12a7ac2546853ffdf1ef7055aea3b50e41cf469caf71eb4d2acabf42d7 Requires -------- python3-qstylizer (rpmlib, GLIBC filtered): (python3.10dist(inflection) < 1 with python3.10dist(inflection) > 0.3) (python3.10dist(tinycss2) < 2 with python3.10dist(tinycss2) >= 0.5) python(abi) Provides -------- python3-qstylizer: python-qstylizer python3-qstylizer python3.10-qstylizer python3.10dist(qstylizer) python3dist(qstylizer) Generated by fedora-review 0.7.6 (b083f91) last change: 2020-11-10 Command line :/usr/bin/fedora-review -b 1977120 Buildroot used: fedora-rawhide-x86_64 Active plugins: Shell-api, Python, Generic Disabled plugins: SugarActivity, Ocaml, Java, Haskell, PHP, C/C++, Perl, R, fonts Disabled flags: EPEL6, EPEL7, DISTTAG, BATCH, EXARCH
(fedscm-admin): The Pagure repository was created at https://src.fedoraproject.org/rpms/python-qstylizer
Thank you for the review. I will file a review request for the new pyls as well soon. If you can, I will appreciate your review on pyls as well - when I file it. Built on rawhide.