diff --git a/macros.aaa-pyproject-srpm b/macros.aaa-pyproject-srpm index 1b06ac3..b394be5 100644 --- a/macros.aaa-pyproject-srpm +++ b/macros.aaa-pyproject-srpm @@ -3,8 +3,8 @@ # When this file is installed but macros.pyproject is not # this macro will cause the package with the real macro to be installed. # When macros.pyproject is installed, it overrides this macro. -# Note: This needs to maintain the same set of options as the real macro. -%pyproject_buildrequires(rRxtNwpe:g:C:) echo 'pyproject-rpm-macros' && exit 0 +# Note: This takes arbitrary options, to ease addition of new options to the real macro. +%pyproject_buildrequires(-) echo 'pyproject-rpm-macros' && exit 0 # Declarative buildsystem, requires RPM 4.20+ to work diff --git a/macros.pyproject b/macros.pyproject index 449afe6..af6b441 100644 --- a/macros.pyproject +++ b/macros.pyproject @@ -166,7 +166,6 @@ fi ]"\ ] -# Note: Keep the options in sync with this macro from macros.aaa-pyproject-srpm %pyproject_buildrequires(rRxtNwpe:g:C:) %{expand:\\\ %_set_pytest_addopts # The default flags expect the package note file to exist diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec index da44d25..105c2a5 100644 --- a/pyproject-rpm-macros.spec +++ b/pyproject-rpm-macros.spec @@ -14,7 +14,7 @@ License: MIT # Increment Y and reset Z when new macros or features are added # Increment Z when this is a bugfix or a cosmetic change # Dropping support for EOL Fedoras is *not* considered a breaking change -Version: 1.16.2 +Version: 1.16.3 Release: 1%{?dist} # Macro files @@ -97,8 +97,9 @@ Requires: /usr/bin/sed # It has been introduced in RPM 4.15 (4.14.90 is the alpha of 4.15). # What we need is rpmlib(DynamicBuildRequires), but that is impossible to (Build)Require. # Also, we need to avoid 4.19.90..4.19.91-7 due to rhbz#2284187 -Requires: ((rpm-build >= 4.14.90 with (rpm-build < 4.19.90 or rpm-build >= 4.19.91-8)) if rpm-build) -BuildRequires: rpm-build >= 4.14.90 +# Also, we need 4.16.1.3-37 or newer to get RHEL-67161 +Requires: ((rpm-build >= 4.16.1.3-37 with (rpm-build < 4.19.90 or rpm-build >= 4.19.91-8)) if rpm-build) +BuildRequires: rpm-build >= 4.16.1.3-37 %description These macros allow projects that follow the Python packaging specifications @@ -118,7 +119,7 @@ which only work with setup.py. %package -n pyproject-srpm-macros Summary: Minimal implementation of %%pyproject_buildrequires Requires: (pyproject-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} if pyproject-rpm-macros) -Requires: (rpm-build >= 4.14.90 if rpm-build) +Requires: (rpm-build >= 4.16.1.3-37 if rpm-build) %description -n pyproject-srpm-macros This package contains a minimal implementation of %%pyproject_buildrequires. @@ -152,15 +153,9 @@ install -pm 644 pyproject_construct_toxenv.py %{buildroot}%{_rpmconfigdir}/redha install -pm 644 pyproject_requirements_txt.py %{buildroot}%{_rpmconfigdir}/redhat/ install -pm 644 pyproject_wheel.py %{buildroot}%{_rpmconfigdir}/redhat/ -%check -# assert the two signatures of %%pyproject_buildrequires match exactly -signature1="$(grep '^%%pyproject_buildrequires' macros.pyproject | cut -d' ' -f1)" -signature2="$(grep '^%%pyproject_buildrequires' macros.aaa-pyproject-srpm | cut -d' ' -f1)" -test "$signature1" == "$signature2" -# but also assert we are not comparing empty strings -test "$signature1" != "" %if %{with tests} +%check export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856356 %pytest -vv --doctest-modules %{?with_pytest_xdist:-n auto} %{!?with_tox_tests:-k "not tox"} @@ -196,6 +191,10 @@ export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856 %changelog +* Tue Dec 03 2024 Miro Hrončok - 1.16.3-1 +- Accept arbitrary options from %%pyproject_buildrequires in pyproject-srpm-macros +- This will make future additions smoother + * Wed Nov 13 2024 Miro Hrončok - 1.16.2-1 - Fix one remaining test for setuptools 70+