Bug 2319701 - python-pyproject-api fails to build with setuptools 74+ [NEEDINFO]
Summary: python-pyproject-api fails to build with setuptools 74+
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pyproject-api
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lumír Balhar
QA Contact:
URL:
Whiteboard:
Depends On: 2293740
Blocks: F42FTBFS PYTHON3.14 SETUPTOOLS74
TreeView+ depends on / blocked
 
Reported: 2024-10-18 10:13 UTC by Miro Hrončok
Modified: 2024-11-07 13:51 UTC (History)
3 users (show)

Fixed In Version: python-pyproject-api-1.8.0-1.fc42
Clone Of:
Environment:
Last Closed: 2024-11-07 13:51:31 UTC
Type: ---
Embargoed:
mhroncok: needinfo?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github tox-dev pyproject-api issues 153 0 None open 1.7.2: `test_setuptools_prepare_metadata_for_build_wheel` fails 2024-10-23 10:07:43 UTC

Description Miro Hrončok 2024-10-18 10:13:04 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-pyproject-api/

While it succeeded with setuptools 69.2.0 and wheel 0.43 in

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

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 Miro Hrončok 2024-10-18 15:48:03 UTC
=================================== FAILURES ===================================
_______________ test_setuptools_prepare_metadata_for_build_wheel _______________

frontend_setuptools = <pyproject_api._via_fresh_subprocess.SubprocessFrontend object at 0x7f375a785d00>
tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_setuptools_prepare_metada0')

    def test_setuptools_prepare_metadata_for_build_wheel(frontend_setuptools: SubprocessFrontend, tmp_path: Path) -> None:
        meta = tmp_path / "meta"
        result = frontend_setuptools.prepare_metadata_for_build_wheel(metadata_directory=meta)
        assert result is not None
        dist = Distribution.at(str(result.metadata))
        assert list(dist.entry_points) == [EntryPoint(name="demo_exe", value="demo:a", group="console_scripts")]
        assert dist.version == "1.0"
        assert dist.metadata["Name"] == "demo"
        values = [v for k, v in dist.metadata.items() if k == "Requires-Dist"]  # type: ignore[attr-defined]
        # ignore because "PackageMetadata" has no attribute "items"
>       assert sorted(values) == ["magic >3", "requests >2"]
E       AssertionError: assert ['magic>3', 'requests>2'] == ['magic >3', 'requests >2']
E         
E         At index 0 diff: 'magic>3' != 'magic >3'
E         Use -v to get more diff

tests/test_frontend_setuptools.py:79: AssertionError
=========================== short test summary info ============================
FAILED tests/test_frontend_setuptools.py::test_setuptools_prepare_metadata_for_build_wheel
========================= 1 failed, 58 passed in 3.48s =========================

Comment 2 Lumír Balhar 2024-10-23 10:09:29 UTC
I know how to fix the problem and it's also reported upstream. When the new setuptools is delivered, I'll either patch this package to build again or do the update if there will be a new release available.

Comment 3 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 4 Lumír Balhar 2024-10-31 09:42:37 UTC
You can ship the update together with the new setuptools. https://src.fedoraproject.org/rpms/python-pyproject-api/pull-request/6

Comment 5 Fedora Update System 2024-11-07 11:49:16 UTC
FEDORA-2024-95990bee9d (python-pyproject-api-1.8.0-1.fc42, python-setuptools-74.1.3-1.fc42, and 1 more) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-95990bee9d

Comment 6 Fedora Update System 2024-11-07 13:51:31 UTC
FEDORA-2024-95990bee9d (python-pyproject-api-1.8.0-1.fc42, python-setuptools-74.1.3-1.fc42, and 1 more) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


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