76 lines
2.3 KiB
RPMSpec
76 lines
2.3 KiB
RPMSpec
# 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
|
|
# Many tests are enabled by default, unless bootstrapping
|
|
%bcond tests %{without bootstrap}
|
|
|
|
%global srcname tox
|
|
|
|
Name: python-%{srcname}
|
|
Version: 4.30.0
|
|
Release: %autorelease
|
|
Summary: Virtualenv-based automation of test activities
|
|
License: MIT
|
|
URL: https://tox.readthedocs.io/
|
|
VCS: https://github.com/tox-dev/tox
|
|
#!RemoteAsset
|
|
Source0: https://files.pythonhosted.org/packages/source/t/%{srcname}/%{srcname}-%{version}.tar.gz
|
|
BuildArch: noarch
|
|
BuildSystem: pyproject
|
|
|
|
BuildOption(install): %{srcname}
|
|
|
|
BuildRequires: pkgconfig(python3)
|
|
BuildRequires: pyproject-rpm-macros
|
|
BuildRequires: python3dist(setuptools)
|
|
BuildRequires: python3dist(build)
|
|
%if %{with tests}
|
|
BuildRequires: gcc
|
|
BuildRequires: git
|
|
BuildRequires: python3dist(flaky)
|
|
BuildRequires: python3dist(pip)
|
|
BuildRequires: python3dist(pytest)
|
|
BuildRequires: python3dist(pytest-mock)
|
|
BuildRequires: pkgconfig(libffi)
|
|
# xdist is not used upstream, but we use it to speed up the %%check
|
|
BuildRequires: python3dist(pytest-xdist)
|
|
%endif
|
|
|
|
Provides: python3-%{srcname}
|
|
%python_provide python3-%{srcname}
|
|
|
|
%description
|
|
Tox as is a generic virtualenv management and test command line tool you
|
|
can use for:
|
|
|
|
- checking your package installs correctly with different Python versions
|
|
and interpreters
|
|
- running your tests in each of the environments, configuring your test tool
|
|
of choice
|
|
- acting as a frontend to Continuous Integration servers, greatly reducing
|
|
boilerplate and merging CI and shell-based testing.
|
|
|
|
%prep -a
|
|
%generate_buildrequires
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}"
|
|
%pyproject_buildrequires -r %{?with_tests:-g test}
|
|
|
|
%build -p
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}"
|
|
|
|
%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}
|
|
%{_bindir}/tox
|
|
|
|
%changelog
|
|
%{?autochangelog}
|