diff --git a/macros.pyproject b/macros.pyproject index a682ed6..685c2bc 100644 --- a/macros.pyproject +++ b/macros.pyproject @@ -185,9 +185,9 @@ fi %{-e:%{expand:%global toxenv %(%{__python3} -s %{_rpmconfigdir}/redhat/pyproject_construct_toxenv.py %{?**})}} echo 'pyproject-rpm-macros' # first stdout line matches the implementation in macros.aaa-pyproject-srpm echo 'python%{python3_pkgversion}-devel' -echo 'python%{python3_pkgversion}dist(pip) >= 19' echo 'python%{python3_pkgversion}dist(packaging)' -%{!-N:if [ -f pyproject.toml ]; then +%{!-N:echo 'python%{python3_pkgversion}dist(pip) >= 19' +if [ -f pyproject.toml ]; then %["%{python3_pkgversion}" == "3" ? "echo '(python%{python3_pkgversion}dist(tomli) if python%{python3_pkgversion}-devel < 3.11)'" : "%[v"%{python3_pkgversion}" < v"3.11" diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec index ca54355..e94e030 100644 --- a/pyproject-rpm-macros.spec +++ b/pyproject-rpm-macros.spec @@ -196,9 +196,11 @@ export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856 %changelog -* Tue Sep 17 2024 Karolina Surma - 1.15.0-1 +* Tue Sep 17 2024 Python Maint - 1.15.0-1 - Add a possibility to read runtime requirements from pyproject.toml [project] table - Fixes: rhbz#2261939 +- Don't generate a dependency on pip when %%pyproject_buildrequires -N is used +- Fixes: rhbz#2294510 * Tue Jul 23 2024 Miro HronĨok - 1.14.0-1 - Add a provisional RPM Declarative Buildsystem (RPM 4.20+) diff --git a/tests/fake-requirements.spec b/tests/fake-requirements.spec index 27d1f83..c0da8e8 100644 --- a/tests/fake-requirements.spec +++ b/tests/fake-requirements.spec @@ -22,9 +22,9 @@ EOF %check -pip show tomli click -%if 0%{?fedora} || 0%{?rhel} > 9 -# On RHEL 9, python3-devel requires (python3-setuptools if rpm-build) -pip show setuptools && exit 1 || true -%endif -pip show wheel && exit 1 || true +grep '^((python3dist(click) < 5 or python3dist(click) > 5) with python3dist(click) >= 4.1)$' %{_pyproject_buildrequires} +grep '^python3dist(tomli) >= 0.10$' %{_pyproject_buildrequires} + +grep 'python3dist(pip)' %{_pyproject_buildrequires} && exit 1 || true +grep 'python3dist(wheel)' %{_pyproject_buildrequires} && exit 1 || true +test -f /usr/bin/pip && exit 1 || true