This package provides the 'lap' Python library, a Linear Assignment Problem solver using the Jonker-Volgenant algorithm. It is required by applications like Beets for efficient tag matching. copr build: https://copr.fedorainfracloud.org/coprs/gbcox/dogfood/build/9181215/ fedora review: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-42-x86_64/09181215-python3-lap/fedora-review/ Reproducible: Always
The ticket summary is not in the correct format. Expected: Review Request: <main package name here> - <short summary here> Found: Review Request: python3-lap As a consequence, the package name cannot be parsed and submitted to be automatically build. Please modify the ticket summary and trigger a build by typing [fedora-review-service-build]. --- 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.
*** Bug 2373261 has been marked as a duplicate of this bug. ***
spec: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09181215-python3-lap/python3-lap.spec srpm: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09181215-python3-lap/python3-lap-0.5.12-1.fc43.src.rpm Initial comments: a) Consider fully using the new build macros, in particular change: %prep %autosetup -p1 -n lap-%{version} %build %pyproject_wheel %install %pyproject_install %files %license LICENSE %{python3_sitearch}/lap/ %{python3_sitearch}/lap-%{version}.dist-info/ to %autosetup -p1 -n lap-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l lap %check %pyproject_check_import %pytest %files -n python3-lap -f %{pyproject_files} %changelog %autochangelog b) With buildrequires automatically generated, you only need BuildRequires: python3-devel BuildRequires: gcc-c++ c) Please also remove Provides: python3.13dist(lap) = %{version} Requires: python3.13dist(numpy) >= 1.20 these should be automatically generated. d) Consuder using pyp2spec to generate python package spec files. e) Consider getting sources from GitHub if pypi sources do not have tests f) License seems to be BSD-3-Clause
(In reply to Benson Muite from comment #3) Thanks for the suggestions, I modified the license, it is BSD-2-Clause. Adopted most of your suggestions, but could get the %check section to work on COPR. I ran it through AI, and it gave me an explanation that I put on the comments. Unfortuately, for the revised version, can't get it go go through Fedora Review. I keep getting: FedoraReview.review_error.ReviewError: 'No disttag in package and no DISTTAG flag. Use --define DISTTAG to set proper dist e. g., --define DISTTAG=fc21.' I obviously have a distag, because the srpm was created with one, so I just resubmitted the original version of code with the license update and that cleared Fedora Review. Here is the link of what I am submitting for review: https://copr.fedorainfracloud.org/coprs/gbcox/dogfood/build/9189271/ Here is the one with your suggestions that keeps getting the review disttag error: https://copr.fedorainfracloud.org/coprs/gbcox/dogfood/build/9189278/
One can get it to build: https://koji.fedoraproject.org/koji/taskinfo?taskID=134163453 Import check should only be done for the top level module: %pyproject_check_import -t https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_test_macros Tests should be run as in: https://github.com/gatagat/lap/blob/master/.github/workflows/test_simple.yaml#L32 so pytest is not needed, but you will need to use %py3_test_envvars Which AI did you use?
This is basically a legacy of the time when we were building the same source packages for Python 2 and Python 3, but the source package for a Python library needs to be named python-foo, while the binary packages are python3-foo. See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_library_naming. So in this case, instead of Name: python3-lap […] %description This package provides the 'lap' Python library, a Linear Assignment Problem solver using the Jonker-Volgenant algorithm. It is required by applications like Beets for efficient tag matching. […] %files %license LICENSE %{python3_sitearch}/lap/ %{python3_sitearch}/lap-%{version}.dist-info/ […] … you should have: Name: python-lap […] %global _description %{expand: This package provides the 'lap' Python library, a Linear Assignment Problem solver using the Jonker-Volgenant algorithm. It is required by applications like Beets for efficient tag matching.} %description %{_description} %package -n python3-lap Summary: %{summary} %description -n python3-lap %{_description} […] %files -n python3-lap -f %{pyproject_files} […] (Note that the python-lap base package will have no %files section.) See: https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_example_spec_file
Thanks very much for the suggestions, I have implemented them. The new COPR link is https://copr.fedorainfracloud.org/coprs/gbcox/dogfood/build/9193801/ I worked with both deepseek and gemini to get the %check section to pass copr. It was an ordeal, and now looks like this: %check # Minimal smoke test that verifies installation without importing C extensions %{python3} -c " import sys sys.path.insert(0, '%{buildroot}%{python3_sitearch}') try: import lap print(f'Package installed at: {lap.__file__}') # Skip actual tests that require C extensions print('Skipping C extension tests in mock environment') sys.exit(0) except ImportError as e: print(f'Critical installation error: {e}') sys.exit(1) " The only other issue I am having is that fedora-review will not work in COPR. It keeps failing with this. Looks like it will need to be run manually: 06-20 18:30 root INFO Getting .spec and .srpm Urls from : Local files in /var/lib/copr-rpmbuild/results 06-20 18:30 root INFO --> SRPM url: file:///var/lib/copr-rpmbuild/results/python-lap-0.5.12-1.fc42.src.rpm 06-20 18:30 root INFO Using review directory: /var/lib/copr-rpmbuild/results/python-lap 06-20 18:30 root DEBUG find_urls completed: 0.022 06-20 18:30 root DEBUG Avoiding init of working mock root 06-20 18:30 root DEBUG Url download completed: 10.512 06-20 18:30 root WARNING No disttag found in prebuilt packages 06-20 18:30 root INFO Use --define DISTTAG to set proper dist. e. g. --define DISTTAG fc21. 06-20 18:30 root DEBUG ReviewError: 'No disttag in package and no DISTTAG flag. Use --define DISTTAG to set proper dist e. g., --define DISTTAG=fc21.' Traceback (most recent call last): File "/usr/lib/python3.13/site-packages/FedoraReview/review_helper.py", line 236, in run self._do_run(outfile) ~~~~~~~~~~~~^^^^^^^^^ File "/usr/lib/python3.13/site-packages/FedoraReview/review_helper.py", line 226, in _do_run self._do_report(outfile) ~~~~~~~~~~~~~~~^^^^^^^^^ File "/usr/lib/python3.13/site-packages/FedoraReview/review_helper.py", line 99, in _do_report self._run_checks(self.bug.spec_file, self.bug.srpm_file, outfile) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/FedoraReview/review_helper.py", line 108, in _run_checks self.checks = Checks(spec, srpm) ~~~~~~^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/FedoraReview/checks.py", line 287, in __init__ self.spec = SpecFile(spec_file, self.flags) ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/FedoraReview/spec_file.py", line 93, in __init__ update_macros() ~~~~~~~~~~~~~^^ File "/usr/lib/python3.13/site-packages/FedoraReview/spec_file.py", line 66, in update_macros expanded = Mock.get_macro(macro, self, flags) File "/usr/lib/python3.13/site-packages/FedoraReview/mock.py", line 358, in get_macro self._macros = self._get_prebuilt_macros(spec, flags) ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "/usr/lib/python3.13/site-packages/FedoraReview/mock.py", line 151, in _get_prebuilt_macros tag = _get_tag_from_flags(self, flags) File "/usr/lib/python3.13/site-packages/FedoraReview/mock.py", line 83, in _get_tag_from_flags raise ReviewError( ...<3 lines>... ) FedoraReview.review_error.ReviewError: 'No disttag in package and no DISTTAG flag. Use --define DISTTAG to set proper dist e. g., --define DISTTAG=fc21.' 06-20 18:30 root ERROR ERROR: 'No disttag in package and no DISTTAG flag. Use --define DISTTAG to set proper dist e. g., --define DISTTAG=fc21.' (logs in /var/lib/copr-rpmbuild/results/cache/fedora-review.log) 06-20 18:30 root DEBUG Report completed: 10.851 seconds
(In reply to Gerald Cox from comment #7) > %check > # Minimal smoke test that verifies installation without importing C > extensions > %{python3} -c " > import sys > sys.path.insert(0, '%{buildroot}%{python3_sitearch}') > try: > import lap > print(f'Package installed at: {lap.__file__}') > # Skip actual tests that require C extensions > print('Skipping C extension tests in mock environment') > sys.exit(0) > except ImportError as e: > print(f'Critical installation error: {e}') > sys.exit(1) > " There is nothing reasonable about this. It is overcomplicated, confusing, misleading and wrong. It tries to avoid testing the compiled extensions (which, by the way, are not written in C), when that is exactly the one thing that you want to do. Listening to AI is not a good idea here. You need to use your own brain, ask questions, and read documentation to get a good result. I’m going to attach a basic, clean spec file to demonstrate how this could be packaged. Feel free to use it, either verbatim or with modifications, as long as you get to the point where you understand what is happening and why.
Created attachment 2094548 [details] Sample spec file for python-lap
(In reply to Ben Beasley from comment #9) > Created attachment 2094548 [details] > Sample spec file for python-lap Thanks Ben. I really appreciate you taking the time to send along the sample SPEC. I've folded in the %check logic it is working now. AI is helpful as a tool, but it makes alot of errors, I've found. Still having an issue with Fedora Review, but that's a glitch with infrastructure, I believe. Fedora Review runs fine outside of COPR. spec: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09196224-python-lap/python-lap.spec srpm: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09196224-python-lap/python-lap-0.5.12-1.fc43.src.rpm
spec: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09197815-python-lap/python-lap.spec srpm: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09197815-python-lap/python-lap-0.5.12-1.fc43.src.rpm
spec: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09197924-python-lap/python-lap.spec srpm: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09197924-python-lap/python-lap-0.5.12-1.fc43.src.rpm
I will take this review.
Package Review ============== Legend: [x] = Pass, [!] = Fail, [-] = Not applicable, [?] = Not evaluated Issues ====== 1. The Summary line in the binary RPM is, literally, "$(summary)". You want %{summary} instead of $(summary). 2. When the tests run, I see lots of these warnings: PytestUnknownMarkWarning: Unknown pytest.mark.timeout - is this a typo? They are just warnings, but if you want to make them go away (and let the tests timeout if they take too long), add this: BuildRequires: %{py3_dist pytest-timeout} I will leave that up to you. 3. You don't actually need the "%global commit" line, which is just one more thing to update on each new release. If you delete that line and download https://github.com/gatagat/lap/archive/v0.5.12/lap-0.5.12.tar.gz (or run "spectool -g python-lap.spec"), then the source RPM will build and compile as expected. This, too, I will leave up to you to decide. 4. I want to make sure you are aware that a declarative buildsystem is now available, and can make your spec file even more succinct. To use it, you would add this to the spec file header: BuildSystem: pyproject BuildOption(install): -l lap Then you could completely remove the %generate_buildrequires and %build sections, and remove the first two lines of %install (the two %pyproject* macro invocations), also replacing "%install" with "%install -a". I will again leave this up to you. ===== MUST items ===== C/C++: [x]: Package does not contain kernel modules. [x]: Development (unversioned) .so files in -devel subpackage, if present. Note: Unversioned so-files in private %_libdir subdirectory (see attachment). Verify they are not in ld path. [x]: If your application is a C or C++ application you must list a BuildRequires against gcc, gcc-c++ or clang. [x]: Package does not contain any libtool archives (.la) [x]: Package contains no static executables. [x]: Rpath absent or only used for internal libs. 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: "BSD 2-Clause License", "Unknown or generated". 26 files have unknown license. [x]: Package must own all directories that it creates. [x]: %build honors applicable compiler flags or justifies otherwise. [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]: Useful -debuginfo package or justification otherwise. [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: No rpmlint messages. [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]: 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]: Large documentation must go in a -doc subpackage. Large could be size (~1MB) or number of files. Note: Documentation size is 4553 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. Note: gpgverify is not used. [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]: Spec use %global instead of %define unless justified. [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. ===== EXTRA items ===== Generic: [x]: Rpmlint is run on all installed packages. Note: No rpmlint messages. [x]: Large data in /usr/share should live in a noarch subpackage if package is arched. [x]: Spec file according to URL is the same as in SRPM. Rpmlint ------- Checking: python3-lap-0.5.12-1.fc43.x86_64.rpm python-lap-0.5.12-1.fc43.src.rpm ============================ 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 rpmlintrc: [PosixPath('/tmp/tmp1o1kghon')] checks: 32, packages: 2 2 packages and 0 specfiles checked; 0 errors, 0 warnings, 8 filtered, 0 badness; has taken 0.3 s Rpmlint (installed packages) ---------------------------- ============================ rpmlint session starts ============================ rpmlint: 2.7.0 configuration: /usr/lib/python3.14/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 1 packages and 0 specfiles checked; 0 errors, 0 warnings, 4 filtered, 0 badness; has taken 0.1 s Unversioned so-files -------------------- python3-lap: /usr/lib64/python3.14/site-packages/lap/_lapjv.cpython-314-x86_64-linux-gnu.so Source checksums ---------------- https://github.com/gatagat/lap/archive/600c210d9bef793ee0fe502cbc350e676a6e083a/lap-600c210d9bef793ee0fe502cbc350e676a6e083a.tar.gz : CHECKSUM(SHA256) this package : b1182e21e89351a2c55bbfe569adf180f11adb93d3221d9c5a9a36d5f9e38176 CHECKSUM(SHA256) upstream package : b1182e21e89351a2c55bbfe569adf180f11adb93d3221d9c5a9a36d5f9e38176 Requires -------- python3-lap (rpmlib, GLIBC filtered): libc.so.6()(64bit) python(abi) python3.14dist(numpy) rtld(GNU_HASH) Provides -------- python3-lap: python-lap python3-lap python3-lap(x86-64) python3.14-lap python3.14dist(lap) python3dist(lap) Generated by fedora-review 0.10.0 (e79b66b) last change: 2023-07-24 Command line :/usr/bin/fedora-review -b 2373806 -m fedora-rawhide-x86_64 Buildroot used: fedora-rawhide-x86_64 Active plugins: Generic, Python, C/C++, Shell-api Disabled plugins: Haskell, Ocaml, R, SugarActivity, fonts, PHP, Java, Ruby, Perl Disabled flags: EXARCH, EPEL6, EPEL7, DISTTAG, BATCH
Jerry, thanks very much for the quick turnaround. Here are the issues you pointed out, and the steps I took to address: 1. The Summary line in the binary RPM is, literally, "$(summary)". You want %{summary} instead of $(summary). Fixed. Thanks! 2. When the tests run, I see lots of these warnings: Thanks for the recommendation. I adopted it. 3. You don't actually need the "%global commit" line... Thanks. I switched to pypi per your advice. 4. I want to make sure you are aware that a declarative buildsystem is now available, and can make your spec file even more succinct. Again, thank you for the suggestion. I was not aware, and I have implemented it. spec: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09205356-python-lap/python-lap.spec srpm: https://download.copr.fedorainfracloud.org/results/gbcox/dogfood/fedora-rawhide-x86_64/09205356-python-lap/python-lap-0.5.12-1.fc43.src.rpm
(In reply to Gerald Cox from comment #15) > Jerry, thanks very much for the quick turnaround. Here are the issues > you pointed out, and the steps I took to address: > > 1. The Summary line in the binary RPM is, literally, "$(summary)". You want > %{summary} instead of $(summary). > > Fixed. Thanks! Well ... it isn't fixed. Now the summary reads, literally, "%{Summary}". You can see that with "rpm -qip python3-lap-0.5.12-1.fc43.x86_64.rpm". Change the upper-case 'S' to lower-case 's': %{summary}. Everything else looks fine, so fix that before importing. This package is APPROVED.
(In reply to Jerry James from comment #16) > (In reply to Gerald Cox from comment #15) > > Jerry, thanks very much for the quick turnaround. Here are the issues > > you pointed out, and the steps I took to address: > > > > 1. The Summary line in the binary RPM is, literally, "$(summary)". You want > > %{summary} instead of $(summary). > > > > Fixed. Thanks! > > Well ... it isn't fixed. Now the summary reads, literally, "%{Summary}". > You can see that with "rpm -qip python3-lap-0.5.12-1.fc43.x86_64.rpm". > Change the upper-case 'S' to lower-case 's': %{summary}. > > Everything else looks fine, so fix that before importing. This package is > APPROVED. Ugh... sorry about that. Just changed and verified via: rpm -qip Thank you very much for your help!
The Pagure repository was created at https://src.fedoraproject.org/rpms/python-lap
FEDORA-2025-78ce8eaae0 (python-lap-0.5.12-1.fc43) has been submitted as an update to Fedora 43. https://bodhi.fedoraproject.org/updates/FEDORA-2025-78ce8eaae0
FEDORA-2025-78ce8eaae0 (python-lap-0.5.12-1.fc43) has been pushed to the Fedora 43 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2025-fdf95f11ac (python-lap-0.5.12-1.fc42) has been submitted as an update to Fedora 42. https://bodhi.fedoraproject.org/updates/FEDORA-2025-fdf95f11ac
FEDORA-2025-fdf95f11ac 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-fdf95f11ac \*` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-fdf95f11ac See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2025-fdf95f11ac (python-lap-0.5.12-1.fc42) has been pushed to the Fedora 42 stable repository. If problem still persists, please make note of it in this bug report.