Files
python-tox-current-env/python-tox-current-env.spec
2026-02-02 10:28:18 +08:00

53 lines
1.6 KiB
RPMSpec

# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
# SPDX-FileContributor: CHEN Xuan <chenxuan@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 modulename tox_current_env
Name: python-tox-current-env
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://github.com/fedora-python/tox-current-env/archive/refs/tags/v%{version}.tar.gz
BuildArch: noarch
BuildSystem: pyproject
BuildOption(install): %{modulename}
BuildRequires: python3-devel
%description
The tox-current-env plugin allows to run tests in current Python environment.
Provides: python3-%{srcname}
%python_provide python3-%{srcname}
%generate_buildrequires
# Don't use %%pyproject_buildrequires -t/-e to avoid a build dependency loop
%pyproject_buildrequires %{?with_tests:-x tests}
%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 -f %{pyproject_files}
%doc README.rst
%changelog
%autochangelog