diff --git a/python-iniconfig.spec b/python-iniconfig.spec index 6944504..b8e865a 100644 --- a/python-iniconfig.spec +++ b/python-iniconfig.spec @@ -8,11 +8,16 @@ BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros -Source0: %{pypi_source iniconfig} - # pytest 6+ needs this and this uses pytest for tests %bcond_without tests +%if %{with tests} +# We BR pytest manually to avoid a dependency on tox in ELN/RHEL +BuildRequires: python3-pytest +%endif + +Source0: %{pypi_source iniconfig} + %global _description %{expand: iniconfig is a small and simple INI-file parser module having a unique set of features: @@ -40,7 +45,7 @@ sed -i "s/py\.test/pytest/" testing/test_iniconfig.py %generate_buildrequires -%pyproject_buildrequires %{?with_tests:-t} +%pyproject_buildrequires %build @@ -54,7 +59,7 @@ sed -i "s/py\.test/pytest/" testing/test_iniconfig.py %if %{with tests} %check -%tox +%pytest -v %endif