Bug 2319694 - python-pyasn1 fails to build with setuptools 74+
Summary: python-pyasn1 fails to build with setuptools 74+
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pyasn1
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rob Crittenden
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: SETUPTOOLS74
TreeView+ depends on / blocked
 
Reported: 2024-10-18 10:12 UTC by Miro Hrončok
Modified: 2024-10-29 12:07 UTC (History)
2 users (show)

Fixed In Version: python-pyasn1-0.6.1-2.fc42
Clone Of:
Environment:
Last Closed: 2024-10-29 10:53:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-11663 0 None None None 2024-10-18 10:15:14 UTC

Description Miro Hrončok 2024-10-18 10:12:38 UTC
Dear package maintainer,

this bugzilla is automated becasue the number of impacted packages it too high to go trough manually.

It appears that your package failed to build with setuptools 74.1.3 and wheel 0.44 in

  https://copr.fedorainfracloud.org/coprs/churchyard/setuptools-74/package/python-pyasn1/

While it succeeded with setuptools 69.2.0 and wheel 0.43 in

  https://copr.fedorainfracloud.org/coprs/churchyard/setuptools-control/package/python-pyasn1/

This usually means this package fails to build with setuptools 74+

We plan to update setuptools to version 74 or newer in Fedora 42. This is an approved Fedora 42 Change:

  https://fedoraproject.org/wiki/Changes/Setuptools_74+



Please analyze the failure and fix it in rawhide. Thanks.


You can use the builds from the churchyard/setuptools-74 copr for local testing.

  mock -r fedora-rawhide-x86_64 --addrepo 'https://download.copr.fedorainfracloud.org/results/churchyard/setuptools-74/fedora-rawhide-$basearch/'


One of the most common problems is that the setup.py test command cannot be used. If that is the case here, run the tests in %check differently, e.g. via %pytest, %tox, %{python3} -m unittest, etc.


If you need help, reach out to me in this bugzilla.

Comment 1 Rob Crittenden 2024-10-18 12:52:36 UTC
I'm having trouble with the conversion because of a subpackage. When I use the %pyproject_save_files macro the build fails with:

Traceback (most recent call last):
  File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 889, in <module>
    main(cli_args)
    ~~~~^^^^^^^^^^
  File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 835, in main
    file_section, module_names = pyproject_save_files_and_modules(
                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        cli_args.buildroot,
        ^^^^^^^^^^^^^^^^^^^
    ...<6 lines>...
        cli_args.varargs,
        ^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 800, in pyproject_save_files_and_modules
    parsed_records = load_parsed_record(pyproject_record)
  File "/usr/lib/rpm/redhat/pyproject_save_files.py", line 765, in load_parsed_record
    raise FileExistsError("%pyproject_install has found more than one *.dist-info/RECORD file. "
                          "Currently, %pyproject_save_files supports only one wheel → one file list mapping. "
                          "Feel free to open a bugzilla for pyproject-rpm-macros and describe your usecase.")
FileExistsError: %pyproject_install has found more than one *.dist-info/RECORD file. Currently, %pyproject_save_files supports only one wheel → one file list mapping. Feel free to open a bugzilla for pyproject-rpm-macros and describe your usecase.

Comment 2 Miro Hrončok 2024-10-18 12:54:01 UTC
If you build multiple Python packages from one specfile, you cannot use %pyproject_save_files. You need to list the files in %files manually.

Comment 3 Rob Crittenden 2024-10-18 13:08:43 UTC
Yeah I had read that, it was a last resort. I was seeing final packaging failures so I tried %pyproject_save_files. I just removed it and now suddenly the build is successful!? Well, I won't argue with success.

BTW I used your pyprojectize tool to do the initial conversion and fine-tuned after that.

I'll get a PR up with my changes soon.

Comment 5 Miro Hrončok 2024-10-29 10:58:39 UTC
I plan to update setuptools to 74.x in rawhide this week.

At that point, this package will fail to build from source if not fixed.

Comment 6 Rob Crittenden 2024-10-29 12:04:37 UTC
It builds fine for me with:

mock -r fedora-rawhide-x86_64 --addrepo 'https://download.copr.fedorainfracloud.org/results/churchyard/setuptools-74/fedora-rawhide-$basearch/' python-pyasn1-0.6.1-2.fc42.src.rpm
...
Wrote: /builddir/build/SRPMS/python-pyasn1-0.6.1-2.fc42.src.rpm
Wrote: /builddir/build/RPMS/python-pyasn1-doc-0.6.1-2.fc42.noarch.rpm
Wrote: /builddir/build/RPMS/python3-pyasn1-modules-0.6.1-2.fc42.noarch.rpm
Wrote: /builddir/build/RPMS/python3-pyasn1-0.6.1-2.fc42.noarch.rpm
Finish: rpmbuild python-pyasn1-0.6.1-2.fc42.src.rpm
Finish: build phase for python-pyasn1-0.6.1-2.fc42.src.rpm
INFO: Done(python-pyasn1-0.6.1-2.fc42.src.rpm) Config(fedora-rawhide-x86_64) 0 minutes 53 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-x86_64/result
Finish: run

Comment 7 Miro Hrončok 2024-10-29 12:07:48 UTC
I sent that comment to this bugzilla accidentally. Sorry about that.


Note You need to log in before you can comment on or make changes to this bug.