Blame SPECS/python-tox-current-env.spec

d4bc36
%bcond bootstrap 1
d4bc36
# Tests are enabled by default, unless bootstrapping (for pytest-xdist)
d4bc36
%bcond tests %{without bootstrap}
d4bc36
d4bc36
Name:           python-tox-current-env
d4bc36
Version:        0.0.12
d4bc36
Release:        %autorelease
d4bc36
Summary:        Tox plugin to run tests in current Python environment
d4bc36
d4bc36
License:        MIT
d4bc36
URL:            https://github.com/fedora-python/tox-current-env
d4bc36
Source0:        %{pypi_source tox-current-env}
d4bc36
BuildArch:      noarch
d4bc36
d4bc36
BuildRequires:  python%{python3_pkgversion}-devel
d4bc36
BuildRequires:  pyproject-rpm-macros
d4bc36
d4bc36
%description
d4bc36
The tox-current-env plugin allows to run tests in current Python environment.
d4bc36
d4bc36
d4bc36
%package -n     python%{python3_pkgversion}-tox-current-env
d4bc36
Summary:        %{summary}
d4bc36
%{?python_provide:%python_provide python%{python3_pkgversion}-tox-current-env}
d4bc36
d4bc36
%description -n python%{python3_pkgversion}-tox-current-env
d4bc36
The tox-current-env plugin allows to run tests in current Python environment.
d4bc36
d4bc36
d4bc36
%prep
d4bc36
%autosetup -n tox-current-env-%{version}
d4bc36
d4bc36
d4bc36
%generate_buildrequires
d4bc36
# Don't use %%pyproject_buildrequires -t/-e to avoid a build dependency loop
d4bc36
%pyproject_buildrequires %{?with_tests:-x tests}
d4bc36
d4bc36
d4bc36
%build
d4bc36
%pyproject_wheel
d4bc36
d4bc36
d4bc36
%install
d4bc36
%pyproject_install
d4bc36
%pyproject_save_files tox_current_env
d4bc36
d4bc36
d4bc36
%check
d4bc36
# hooks[34].py are imported in hooks.py based on tox version so we have to
d4bc36
# exclude them here.
d4bc36
%pyproject_check_import -e '*.hooks?'
d4bc36
%if %{with tests}
d4bc36
# deselected tests run tox without the options for this plugin and hence they need internet
d4bc36
%pytest -k "not regular and not noquiet_installed_packages[None]"
d4bc36
%endif
d4bc36
d4bc36
d4bc36
%files -n python%{python3_pkgversion}-tox-current-env -f %{pyproject_files}
d4bc36
%doc README.rst
d4bc36
d4bc36
d4bc36
%changelog
d4bc36
%autochangelog