diff --git a/.python-tox-current-env.metadata b/.python-tox-current-env.metadata new file mode 100644 index 0000000..929aee6 --- /dev/null +++ b/.python-tox-current-env.metadata @@ -0,0 +1 @@ +bfc3e9ded02de6cfe6cdc2c037e8d9d8e1ea0ca8 SOURCES/tox-current-env-0.0.12.tar.gz diff --git a/SOURCES/.gitkeep b/SOURCES/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/SOURCES/.gitkeep diff --git a/SPECS/python-tox-current-env.spec b/SPECS/python-tox-current-env.spec new file mode 100644 index 0000000..e041c40 --- /dev/null +++ b/SPECS/python-tox-current-env.spec @@ -0,0 +1,63 @@ +%bcond bootstrap 1 +# Tests are enabled by default, unless bootstrapping (for pytest-xdist) +%bcond tests %{without bootstrap} + +Name: python-tox-current-env +Version: 0.0.12 +Release: %autorelease +Summary: Tox plugin to run tests in current Python environment + +License: MIT +URL: https://github.com/fedora-python/tox-current-env +Source0: %{pypi_source tox-current-env} +BuildArch: noarch + +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: pyproject-rpm-macros + +%description +The tox-current-env plugin allows to run tests in current Python environment. + + +%package -n python%{python3_pkgversion}-tox-current-env +Summary: %{summary} +%{?python_provide:%python_provide python%{python3_pkgversion}-tox-current-env} + +%description -n python%{python3_pkgversion}-tox-current-env +The tox-current-env plugin allows to run tests in current Python environment. + + +%prep +%autosetup -n tox-current-env-%{version} + + +%generate_buildrequires +# Don't use %%pyproject_buildrequires -t/-e to avoid a build dependency loop +%pyproject_buildrequires %{?with_tests:-x tests} + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files tox_current_env + + +%check +# 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} +%doc README.rst + + +%changelog +%autochangelog