From bd620d1eab8d480a4ce4e53cfd0d8ec9bd20868e Mon Sep 17 00:00:00 2001 From: Jvle Date: Thu, 5 Mar 2026 12:17:56 +0800 Subject: [PATCH] SPECS: add python-tox-current-env Signed-off-by: Jvle --- python-tox-current-env.spec | 52 +++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 python-tox-current-env.spec diff --git a/python-tox-current-env.spec b/python-tox-current-env.spec new file mode 100644 index 0000000..f332bfd --- /dev/null +++ b/python-tox-current-env.spec @@ -0,0 +1,52 @@ +# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS) +# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors +# SPDX-FileContributor: Jvle +# +# SPDX-License-Identifier: MulanPSL-2.0 + +%bcond bootstrap 0 +# Tests are enabled by default, unless bootstrapping (for pytest-xdist) +%bcond tests %{without bootstrap} + +%global srcname tox-current-env +%global binaries_name tox_current_env + +Name: python-%{srcname} +Version: 0.0.16 +Release: %autorelease +Summary: Tox plugin to run tests in current Python environment +License: MIT +URL: https://github.com/fedora-python/tox-current-env +#!RemoteAsset +Source0: https://files.pythonhosted.org/packages/source/t/%{binaries_name}/%{binaries_name}-%{version}.tar.gz +BuildArch: noarch +BuildSystem: pyproject + +BuildOption(install): %{srcname} +BuildOption(check): -e '*.hooks?' + +BuildRequires: pkgconfig(python3) +BuildRequires: pyproject-rpm-macros +BuildRequires: python3dist(tox) + +Provides: python3-%{srcname} +%python_provide python3-%{srcname} + +%description +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 %{?with_tests:-x tests} + +%check -a +%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 -f %{pyproject_files} +%doc README.rst + +%changelog +%{?autochangelog}