diff --git a/python-tox-current-env.spec b/python-tox-current-env.spec index a8167bf..c6c67b2 100644 --- a/python-tox-current-env.spec +++ b/python-tox-current-env.spec @@ -11,6 +11,8 @@ BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: pyproject-rpm-macros +%bcond tests 1 + %description The tox-current-env plugin allows to run tests in current Python environment. @@ -29,7 +31,7 @@ The tox-current-env plugin allows to run tests in current Python environment. %generate_buildrequires # Don't use %%pyproject_buildrequires -t/-e to avoid a build dependency loop -%pyproject_buildrequires -x tests +%pyproject_buildrequires %{?with_tests:-x tests} %build @@ -45,8 +47,10 @@ The tox-current-env plugin allows to run tests in current Python environment. # hooks[34].py are imported in hooks.py based on tox version so we have to # exclude them here. %pyproject_check_import -e '*.hooks?' +%if %{with tests} # deselected tests run tox without the options for this plugin and hence they need internet %pytest -k "not regular and not noquiet_installed_packages[None]" +%endif %files -n python%{python3_pkgversion}-tox-current-env -f %{pyproject_files}