Fix %pyproject_buildrequires -w when the build backend is already installed and pip isn't

Fixes: https://bugzilla.redhat.com/2169855
This commit is contained in:
Miro Hrončok 2023-12-11 14:29:01 +01:00
parent 9afde6e68e
commit f8b0e925e8
3 changed files with 9 additions and 0 deletions

View File

@ -191,6 +191,8 @@ export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856
- Fixes: rhbz#2244282 - Fixes: rhbz#2244282
- Show a better error message when %%pyproject_install finds no wheel - Show a better error message when %%pyproject_install finds no wheel
- Fixes: rhbz#2242452 - Fixes: rhbz#2242452
- Fix %%pyproject_buildrequires -w when the build backend is already installed and pip isn't
- Fixes: rhbz#2169855
* Wed Sep 13 2023 Python Maint <python-maint@redhat.com> - 1.10.0-1 * Wed Sep 13 2023 Python Maint <python-maint@redhat.com> - 1.10.0-1
- Add %%_pyproject_check_import_allow_no_modules for automated environments - Add %%_pyproject_check_import_allow_no_modules for automated environments

View File

@ -328,6 +328,11 @@ def generate_run_requirements_wheel(backend, requirements, wheeldir):
# Reuse the wheel from the previous round of %pyproject_buildrequires (if it exists) # Reuse the wheel from the previous round of %pyproject_buildrequires (if it exists)
wheel = find_built_wheel(wheeldir) wheel = find_built_wheel(wheeldir)
if not wheel: if not wheel:
# pip is already echoed from the macro
# but we need to explicitly restart if has not yet been installed
# see https://bugzilla.redhat.com/2169855
requirements.add('pip >= 19', source='%pyproject_buildrequires -w')
requirements.check(source='%pyproject_buildrequires -w')
import pyproject_wheel import pyproject_wheel
returncode = pyproject_wheel.build_wheel( returncode = pyproject_wheel.build_wheel(
wheeldir=wheeldir, wheeldir=wheeldir,

View File

@ -365,6 +365,7 @@ Run dependencies with extras and build wheel option:
setuptools: 50 setuptools: 50
wheel: 1 wheel: 1
pyyaml: 1 pyyaml: 1
pip: 20
include_runtime: true include_runtime: true
build_wheel: true build_wheel: true
extras: extras:
@ -375,6 +376,7 @@ Run dependencies with extras and build wheel option:
python3dist(wheel) python3dist(wheel)
python3dist(wheel) python3dist(wheel)
python3dist(setuptools) >= 40 python3dist(setuptools) >= 40
python3dist(pip) >= 19
python3dist(py) >= 1.5 python3dist(py) >= 1.5
python3dist(six) >= 1.10 python3dist(six) >= 1.10
python3dist(setuptools) python3dist(setuptools)