diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec index 1d45985..6108f90 100644 --- a/pyproject-rpm-macros.spec +++ b/pyproject-rpm-macros.spec @@ -62,6 +62,14 @@ BuildRequires: python3dist(tox-current-env) >= 0.0.6 %endif BuildRequires: python3dist(wheel) BuildRequires: (python3dist(tomli) if python3 < 3.11) + +# RHEL 9: We also run pytest with Python 3.11 +BuildRequires: python3.11dist(pytest) +BuildRequires: python3.11dist(pyyaml) +BuildRequires: python3.11dist(packaging) +BuildRequires: python3.11dist(pip) +BuildRequires: python3.11dist(setuptools) +BuildRequires: python3.11dist(wheel) %endif # We build on top of those: @@ -137,6 +145,10 @@ test "$signature1" != "" 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"} +# RHEL 9 only: +%global __pytest %{__pytest}-3.11 +%pytest -vv --doctest-modules -k "not tox" + # brp-compress is provided as an argument to get the right directory macro expansion %{python3} compare_mandata.py -f %{_rpmconfigdir}/brp-compress %endif