From c1a65cba5dc9d731575aa24ac0315e0a82a520d7 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 1 Aug 2025 13:20:39 -0400 Subject: [PATCH] Avoid tox dependency RHEL does not include tox, but even in Fedora it add much value relative to its dependencies; calling %pytest directly is simpler. --- python-pytest-subtests.spec | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/python-pytest-subtests.spec b/python-pytest-subtests.spec index 5ff2d8f..a98ed42 100644 --- a/python-pytest-subtests.spec +++ b/python-pytest-subtests.spec @@ -10,7 +10,16 @@ Source: %{pypi_source pytest_subtests} BuildSystem: pyproject BuildOption(install): -l pytest_subtests -BuildOption(generate_buildrequires): -t + +# Don’t depend on pytest-xdist on RHEL/ELN, since it’s unwanted there. Keep the +# dependency in Fedora because it enables several integration tests. +# +# (For similar reasons, we don’t pass -t to %%pyproject_buildrequires and we +# run tests via %%pytest directly instead of via %%tox: tox is unwanted in +# RHEL/ELN, and the benefit of using it in this package is small.) +%if %{undefined rhel} +BuildRequires: python3dist(pytest-xdist) +%endif BuildArch: noarch @@ -26,7 +35,7 @@ Summary: %{summary} %check -a -%tox -- -- -rs -v tests +%pytest -rs -v tests %files -n python3-pytest-subtests -f %{pyproject_files}