SPECS: add python-tox-current-env

Signed-off-by: Jvle <keke.oerv@isrc.iscas.ac.cn>
This commit is contained in:
Jvle
2026-03-05 12:17:56 +08:00
commit bd620d1eab
+52
View File
@@ -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 <keke.oerv@isrc.iscas.ac.cn>
#
# 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}