Description of problem: When the %pyproject_buildrequires macro is used with the -w option (build wheel and read the metadata from it) and the build backend is already installed but pip isn't, then the build fails with: Requirement satisfied: hatchling (installed: hatchling 1.13.0) /usr/bin/python3: No module named pip Traceback (most recent call last): File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 532, in main generate_requires( File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 444, in generate_requires generate_run_requirements(backend, requirements, build_wheel=build_wheel, wheeldir=wheeldir) File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 352, in generate_run_requirements generate_run_requirements_wheel(backend, requirements, wheeldir) File "/usr/lib/rpm/redhat/pyproject_buildrequires.py", line 333, in generate_run_requirements_wheel raise RuntimeError('Failed to build the wheel for %pyproject_buildrequires -w.') RuntimeError: Failed to build the wheel for %pyproject_buildrequires -w. This is caused by the fact that the macro echoes pip but the %generate_buildrequires section does not restart before using it. Version-Release number of selected component: 1.6.2-1 How reproducible: Always. Steps to Reproduce: 1. Take e.g. https://src.fedoraproject.org/rpms/pyproject-rpm-macros/blob/rawhide/f/tests/python-userpath.spec 2. Apply this change: BuildRequires: python3-devel +BuildRequires: python3-hatchling ... %generate_buildrequires -%pyproject_buildrequires requirements-dev.txt -w +%pyproject_buildrequires -w ... %check -%pytest +#pytest (The requirements-dev.txt argument must be removed because it hides this problem.) 3. Build the spec in mock/koji. Actual results: /usr/bin/python3: No module named pip ... RuntimeError: Failed to build the wheel for %pyproject_buildrequires -w. Expected results: pip is installed, package builds fine. Additional info: Possible fix: Before calling pyproject_wheel.build_wheel(...), requirements.add('pip', ...) and requirements.check(...).
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle. Changing version to 39.
https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/429
FEDORA-2023-5c3c30efe7 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-5c3c30efe7
FEDORA-2023-5c3c30efe7 has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2023-36695c32fa has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-36695c32fa
FEDORA-2023-d2fed10480 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-d2fed10480
FEDORA-2023-36695c32fa has been pushed to the Fedora 39 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-36695c32fa` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-36695c32fa See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-d2fed10480 has been pushed to the Fedora 38 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-d2fed10480` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-d2fed10480 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2023-36695c32fa has been pushed to the Fedora 39 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2023-d2fed10480 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.