spec: https://terjeros.fedorapeople.org/python-pyfzf/python-pyfzf.spec srpm: https://terjeros.fedorapeople.org/python-pyfzf/python-pyfzf-0.3.1-1.fc41.src.rpm koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=125754987 (rawhide) https://koji.fedoraproject.org/koji/taskinfo?taskID=125754990 (f41) https://koji.fedoraproject.org/koji/taskinfo?taskID=125754995 (f40) desc: A python wrapper for junegunn's awesome fzf. user: terjeros
Copr build: https://copr.fedorainfracloud.org/coprs/build/8244060 (succeeded) Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2325294-python-pyfzf/fedora-rawhide-x86_64/08244060-python-pyfzf/fedora-review/review.txt Please take a look if any issues were found. --- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
ok plucking the low lying fruits. sources can be downloaded from pypi, so you should get something like this. note the %files section is a bit... incorrect %global srcname pyfzf Name: python-%{srcname} Version: 0.3.1 Release: %autorelease Summary: Python wrapper for junegunn's fuzzyfinder (fzf) License: MIT URL: https://pypi.python.org/pypi/%{srcname} Source: %pypi_source BuildArch: noarch BuildRequires: python3-devel %description A python wrapper for junegunn's awesome fzf. %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{description} %prep %autosetup -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %files -n python3-%{srcname} -f %{pyproject_files} %doc README.* %license LICENSE %{python3_sitelib}/pyfzf %{python3_sitelib}/pyfzf-%{version}-py%{python3_version}.egg-info %changelog %autochangelog
ignore last comment, use this insted. template from https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/ Note: rmember, this is non-binding. a sponsor will still review your package for any mistakes we make %global srcname pyfzf Name: python-%{srcname} Version: 0.3.1 Release: %autorelease Summary: Python wrapper for junegunn's fuzzyfinder (fzf) License: MIT URL: https://pypi.python.org/pypi/%{srcname} Source: %pypi_source BuildArch: noarch BuildRequires: python3-devel %description A python wrapper for junegunn's awesome fzf. %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{description} %prep %autosetup -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{srcname} %files -n python3-%{srcname} -f %{pyproject_files} %doc README.* %license LICENSE %changelog %autochangelog
Thanks! spec: https://terjeros.fedorapeople.org/python-pyfzf/python-pyfzf.spec srpm: https://terjeros.fedorapeople.org/python-pyfzf/python-pyfzf-0.3.1-1.fc41.src.rpm koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=125794808 (rawhide) https://koji.fedoraproject.org/koji/taskinfo?taskID=125794809 (f41) https://koji.fedoraproject.org/koji/taskinfo?taskID=125794811 (f40)
Created attachment 2057380 [details] The .spec file difference from Copr build 8244060 to 8247803
Copr build: https://copr.fedorainfracloud.org/coprs/build/8247803 (succeeded) Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2325294-python-pyfzf/fedora-rawhide-x86_64/08247803-python-pyfzf/fedora-review/review.txt Please take a look if any issues were found. --- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
Fixed shebang, new spec and srpm: spec: https://terjeros.fedorapeople.org/python-pyfzf/python-pyfzf.spec srpm: https://terjeros.fedorapeople.org/python-pyfzf/python-pyfzf-0.3.1-1.fc41.src.rpm
Created attachment 2057381 [details] The .spec file difference from Copr build 8247803 to 8247896
Copr build: https://copr.fedorainfracloud.org/coprs/build/8247896 (succeeded) Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2325294-python-pyfzf/fedora-rawhide-x86_64/08247896-python-pyfzf/fedora-review/review.txt Please take a look if any issues were found. --- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
Notes/Issues ============ - Consider passing the package name to %{pypi_src}, e.g. %{pypi_source ${srcname}}. It's recommended: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_convenience_macros - [!]: %check is present and all tests pass. Upstream doesn't provide any tests, but you can do an import check: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_tests This will at least detect missing runtime dependencies, if any. - The license file is duplicate. It's already present in the metadata: $ rpm -q --licensefiles -p results/python3-pyfzf-0.3.1-1.fc43.noarch.rpm /usr/lib/python3.13/site-packages/pyfzf-0.3.1.dist-info/licenses/LICENSE /usr/share/licenses/python3-pyfzf/LICENSE You can avoid that by adding `-l` flag to `%pyproject_save_files`. That will check if a license file is included in the metadata. If not, it fails. Using `-l` you can drop `%license LICENSE` from %files. (https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_build_macros) - python3-pyfzf.noarch: W: unexpanded-macro %description -l C %{description} python3-pyfzf.noarch: W: description-shorter-than-summary You are using `%{description}` for the description of the python3 sub package. That doesn't work. $ rpm -qi -p results/python3-pyfzf-0.3.1-1.fc43.noarch.rpm Name : python3-pyfzf Version : 0.3.1 Release : 1.fc43 ... Summary : Python wrapper for junegunn's fuzzyfinder (fzf) Description : %{description} <--- [!] If you want to reuse the description from the main package, you need to define it in a global macro as shown in the example spec file: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_example_spec_file In this case, since the description is very short anyway, it might not be worth the trouble. That's up to you. 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. [x]: Package must own all directories that it creates. [x]: Package contains no bundled libraries without FPC exception. [x]: Changelog in prescribed format. [x]: Sources contain only permissible code or content. [x]: Macros in Summary, %description expandable at SRPM build time. [-]: 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. [?]: 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]: 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]: The License field must be a valid SPDX expression. [x]: Package requires other packages for directories it uses. [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]: 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]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 1232 bytes in 1 files. [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). [?]: 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. [x]: Package should compile and build into binary rpms on all supported architectures. [!]: %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-pyfzf-0.3.1-1.fc43.noarch.rpm python-pyfzf-0.3.1-1.fc43.src.rpm ============================ rpmlint session starts ============================ rpmlint: 2.6.1 configuration: /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-legacy-licenses.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml rpmlintrc: [PosixPath('/tmp/tmp4hegcfgw')] checks: 32, packages: 2 python3-pyfzf.noarch: W: unexpanded-macro %description -l C %{description} python-pyfzf.src: E: spelling-error ("junegunn's", "Summary(en_US) junegunn's -> gunnel's, gunner's") python-pyfzf.src: E: spelling-error ('fuzzyfinder', 'Summary(en_US) fuzzyfinder -> fuzzy finder, fuzzy-finder, faultfinder') python-pyfzf.src: E: spelling-error ("junegunn's", "%description -l en_US junegunn's -> gunnel's, gunner's") python3-pyfzf.noarch: E: spelling-error ("junegunn's", "Summary(en_US) junegunn's -> gunnel's, gunner's") python3-pyfzf.noarch: E: spelling-error ('fuzzyfinder', 'Summary(en_US) fuzzyfinder -> fuzzy finder, fuzzy-finder, faultfinder') python-pyfzf.spec: W: no-%check-section python-pyfzf.src: W: description-shorter-than-summary python3-pyfzf.noarch: W: description-shorter-than-summary 2 packages and 0 specfiles checked; 5 errors, 4 warnings, 7 filtered, 5 badness; has taken 0.7 s Rpmlint (installed packages) ---------------------------- ============================ rpmlint session starts ============================ rpmlint: 2.7.0 configuration: /usr/lib/python3.13/site-packages/rpmlint/configdefaults.toml /etc/xdg/rpmlint/fedora-spdx-licenses.toml /etc/xdg/rpmlint/fedora.toml /etc/xdg/rpmlint/scoring.toml /etc/xdg/rpmlint/users-groups.toml /etc/xdg/rpmlint/warn-on-functions.toml checks: 32, packages: 1 python3-pyfzf.noarch: W: unexpanded-macro %description -l C %{description} python3-pyfzf.noarch: E: spelling-error ("junegunn's", "Summary(en_US) junegunn's -> gunnel's, gunner's") python3-pyfzf.noarch: E: spelling-error ('fuzzyfinder', 'Summary(en_US) fuzzyfinder -> fuzzy finder, fuzzy-finder, faultfinder') python3-pyfzf.noarch: W: description-shorter-than-summary 1 packages and 0 specfiles checked; 2 errors, 2 warnings, 3 filtered, 2 badness; has taken 0.1 s Source checksums ---------------- https://files.pythonhosted.org/packages/source/p/pyfzf/pyfzf-0.3.1.tar.gz : CHECKSUM(SHA256) this package : dd902e34cffeca9c3082f96131593dd20b4b3a9bba5b9dde1b0688e424b46bd2 CHECKSUM(SHA256) upstream package : dd902e34cffeca9c3082f96131593dd20b4b3a9bba5b9dde1b0688e424b46bd2 Requires -------- python3-pyfzf (rpmlib, GLIBC filtered): python(abi) Provides -------- python3-pyfzf: python-pyfzf python3-pyfzf python3.13-pyfzf python3.13dist(pyfzf) python3dist(pyfzf) Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24 Command line :/usr/bin/fedora-review -b 2325294 Buildroot used: fedora-rawhide-x86_64 Active plugins: Generic, Shell-api, Python Disabled plugins: Haskell, Ocaml, C/C++, Java, fonts, SugarActivity, PHP, R, Perl Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH
hi, thanks for review! New package ready: - fixed duplicate license issue - add fzf to buildreq and req - add a test and run it with pytest - fixed description - use macro in source url spec: https://terjeros.fedorapeople.org/python-pyfzf/python-pyfzf.spec srpm: https://terjeros.fedorapeople.org/python-pyfzf/python-pyfzf-0.3.1-1.fc42.src.rpm koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=131866719 user: terjeros
Created attachment 2086463 [details] The .spec file difference from Copr build 8247896 to 8952544
Copr build: https://copr.fedorainfracloud.org/coprs/build/8952544 (succeeded) Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2325294-python-pyfzf/fedora-rawhide-x86_64/08952544-python-pyfzf/fedora-review/review.txt Please take a look if any issues were found. --- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
$ rpm -qp --licensefiles RPMS/noarch/python3-pyfzf-0.3.1-1.fc42.noarch.rpm /usr/lib/python3.13/site-packages/pyfzf-0.3.1.dist-info/LICENSE $ rpm -qpi RPMS/noarch/python3-pyfzf-0.3.1-1.fc42.noarch.rpm Name : python3-pyfzf Version : 0.3.1 Release : 1.fc42 Architecture: noarch Size : 9670 License : MIT Source RPM : python-pyfzf-0.3.1-1.fc42.src.rpm URL : https://pypi.python.org/pypi/pyfzf Summary : Python wrapper for junegunn's fuzzyfinder (fzf) Description : Python wrapper for junegunn's awesome fuzzyfinder (fzf), a general-purpose command-line fuzzy finder.
(In reply to Terje Rosten from comment #11) > New package ready: > > - fixed duplicate license issue > - add fzf to buildreq and req > - add a test and run it with pytest > - fixed description > - use macro in source url [!] - fixed duplicate license issue You removed `-l` from %pyproject_save_files. While this works, it will break your package should upstream accidentally remove the LICENSE file or switch to another build backend that does not automagically include it. Every package MUST have a license file. My earlier comment could have been clearer. Rule of thumb: Only remove %license from %files when using `%pyproject_save_files -l`. [x] - add fzf to buildreq and req [x] - add a test and run it with pytest That's fine if you want to do that. But you are generally not required to supply your own tests for a package. It's not what I asked for either. Though it did bring to light that `fzf` is required for being able to use `pyfzf`. In that respect, had upstream added unit tests, this would most likely have become apparent sooner. I was referring to %pyproject_check_import - a macro that will simply import every module of a package. It's sometimes referred to as a smoke test, since it doesn't test functionality, but can detect missing runtime requirements upstream forgot to specify or optional dependencies used incorrectly. [x] - fixed description [x] - use macro in source url Talking about the diff and your spec file, three more points: a. `BuildRequires: sed` is unnecessary and should be removed. The rpm package itself already requires `sed`. Thus it will always be available in the chroot without specifying it. b. You are using `sed` in %install to fix a shebang. If you need to modify any sources, please do so in %prep. Simply moving the `sed` line and fixing the path to the file should be enough. c. %check comes before %files. Please have a look at the templates: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_example_spec_file Please address the issue marked [!] as well as points b and c.
Next iteration: - add back the missing -l arg to %pyproject_save_files - remove sed from buildreq - move %check section - move sed call to %prep spec: https://terjeros.fedorapeople.org/python-pyfzf/python-pyfzf.spec srpm: https://terjeros.fedorapeople.org/python-pyfzf/python-pyfzf-0.3.1-1.fc42.src.rpm koji: https://koji.fedoraproject.org/koji/taskinfo?taskID=131909942 user: terjeros
Created attachment 2086810 [details] The .spec file difference from Copr build 8952544 to 8956917
Copr build: https://copr.fedorainfracloud.org/coprs/build/8956917 (succeeded) Review template: https://download.copr.fedorainfracloud.org/results/@fedora-review/fedora-review-2325294-python-pyfzf/fedora-rawhide-x86_64/08956917-python-pyfzf/fedora-review/review.txt Please take a look if any issues were found. --- This comment was created by the fedora-review-service https://github.com/FrostyX/fedora-review-service If you want to trigger a new Copr build, add a comment containing new Spec and SRPM URLs or [fedora-review-service-build] string.
Required changes have been implemented. One last thing: Please move `Requires: fzf` from the main package to `python3-pyzfz` on import. It's the installable package requiring `fzf` not the source package. That's covered by `BuildRequires:`. $ rpm -q --requires -p results/python3-pyfzf-0.3.1-1.fc43.noarch.rpm python(abi) = 3.13 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 This should list `fzf` as a dependency, but it doesn't because of above. Otherwise the package looks good. APPROVED.
Yep, I will fix that, thanks for review and approval!
The Pagure repository was created at https://src.fedoraproject.org/rpms/python-pyfzf
FEDORA-2025-6b6cad0e4d (python-pyfzf-0.3.1-2.fc42) has been submitted as an update to Fedora 42. https://bodhi.fedoraproject.org/updates/FEDORA-2025-6b6cad0e4d
FEDORA-2025-557dc00066 (python-pyfzf-0.3.1-2.fc40) has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2025-557dc00066
FEDORA-2025-557dc00066 has been pushed to the Fedora 40 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-557dc00066 \*` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-557dc00066 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2025-903fd0740d has been pushed to the Fedora 41 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-903fd0740d \*` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-903fd0740d See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2025-6b6cad0e4d has been pushed to the Fedora 42 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-6b6cad0e4d \*` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-6b6cad0e4d See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2025-557dc00066 (python-pyfzf-0.3.1-2.fc40) has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2025-903fd0740d (python-pyfzf-0.3.1-2.fc41) has been pushed to the Fedora 41 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2025-6b6cad0e4d (python-pyfzf-0.3.1-2.fc42) has been pushed to the Fedora 42 stable repository. If problem still persists, please make note of it in this bug report.