diff --git a/macros.pyproject b/macros.pyproject index 63f127d..70f2aeb 100644 --- a/macros.pyproject +++ b/macros.pyproject @@ -87,6 +87,10 @@ echo 'python%{python3_pkgversion}dist(pip) >= 19' echo 'python%{python3_pkgversion}dist(packaging)' if [ -f pyproject.toml ]; then echo 'python%{python3_pkgversion}dist(toml)' +else + # Note: If the default requirements change, also change them in the script! + echo 'python%{python3_pkgversion}dist(setuptools) >= 40.8' + echo 'python%{python3_pkgversion}dist(wheel)' fi # Check if we can generate dependencies on Python extras if [ "%{py_dist_name []}" == "[]" ]; then diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec index a32c3c8..16d8ad8 100644 --- a/pyproject-rpm-macros.spec +++ b/pyproject-rpm-macros.spec @@ -107,6 +107,7 @@ export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856 * Tue Feb 02 2021 Miro HronĨok - 0-37 - Remove support for Python 3.7 from %%pyproject_buildrequires - Generate python3dist(toml) BR with pyproject.toml earlier to avoid extra install round +- Generate python3dist(setutpools/wheel) BR without pyproject.toml earlier as well * Wed Jan 27 2021 Fedora Release Engineering - 0-36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/pyproject_buildrequires.py b/pyproject_buildrequires.py index 7038ac4..2c9992e 100644 --- a/pyproject_buildrequires.py +++ b/pyproject_buildrequires.py @@ -177,6 +177,10 @@ def get_backend(requirements): # (either directly, or by implicitly invoking the [following] backend). backend_name = 'setuptools.build_meta:__legacy__' + # Note: For projects without pyproject.toml, this was already echoed + # by the %pyproject_buildrequires macro, but this also handles cases + # with pyproject.toml without a specified build backend. + # If the default requirements change, also change them in the macro! requirements.add('setuptools >= 40.8', source='default build backend') requirements.add('wheel', source='default build backend')