forked from pool/python-tox
Dirk Mueller
cf6fb0401e
* docs(plugin): explain plugin registration * Fix error caused by a bad `base_python` path * Fix typos discovered by codespell * Providing example to make CLI help more helpful for -x,-- override * Remove stray colons in `config.rst` left over from #3111 * on venv cleanup: add explicit check for pypy venv to make it possible to recreate it * --showconfig overhaul - Update to 2.1.1: * fix issue258, fix issue248, fix issue253: for non-test commands * fix issue247: tox now passes the LANG variable from the tox invocation invocation environment to the test environment and on Windows on unix additionally ``TMPDIR`` is passed. If you need to pass execute: the new per-venv "platform" setting allows to specify If platform is set and doesn't match the platform spec in the test for testenv sections. Can be used from plugins through the call virtualenv through "python -m virtualenv" with the same + fix issue116: make 1.6 introduced behaviour of changing to a per-env HOME directory during install activities dependent + fix issue117: python2.5 fix: don't use ``--insecure`` option because want to support python2.5/pip1.3.1 based test environments you need + fix issue91: python2.5 support by vendoring the virtualenv-1.9.1 script and forcing pip<1.4. Also the default [py25] environment to use pip without the "--pre" option which was introduced with pip-1.4 and is now required if you want to install non-stable - make sure test commands are searched first in the virtualenv - show (test) command that is being executed, thanks - depend on virtualenv-1.9.1 + refactor reporting and virtualenv manipulation OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tox?expand=0&rev=111
175 lines
6.4 KiB
RPMSpec
175 lines
6.4 KiB
RPMSpec
#
|
|
# spec file for package python-tox
|
|
#
|
|
# Copyright (c) 2023 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?sle15_python_module_pythons}
|
|
%if %{defined sle15_python_module_pythons}
|
|
%bcond_without devpi_process
|
|
%else
|
|
%bcond_with devpi_process
|
|
%endif
|
|
Name: python-tox
|
|
Version: 4.11.3
|
|
Release: 0
|
|
Summary: Virtualenv-based automation of test activities
|
|
License: MIT
|
|
URL: https://github.com/tox-dev/tox
|
|
Source: https://files.pythonhosted.org/packages/source/t/tox/tox-%{version}.tar.gz
|
|
# PATCH-FIX-OPENSUSE optional_devpi_process.patch bsc#[0-9]+ mcepl@suse.com
|
|
# Make use devpi_process optional
|
|
Patch0: optional_devpi_process.patch
|
|
# PATCH-FEATURE-UPSTREAM mark-network-tests.patch bsc#[0-9]+ mcepl@suse.com
|
|
# to skip test which require network access
|
|
Patch1: mark-network-tests.patch
|
|
BuildRequires: %{python_module build >= 0.10.0}
|
|
BuildRequires: %{python_module cachetools >= 5.3}
|
|
BuildRequires: %{python_module chardet >= 5.1}
|
|
BuildRequires: %{python_module colorama >= 0.4.6}
|
|
BuildRequires: %{python_module filelock >= 3.11.0}
|
|
BuildRequires: %{python_module hatch >= 0.3}
|
|
BuildRequires: %{python_module hatch_vcs}
|
|
BuildRequires: %{python_module hatchling >= 1.14}
|
|
BuildRequires: %{python_module packaging >= 23.1}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module platformdirs >= 3.5.1}
|
|
BuildRequires: %{python_module pluggy >= 1.0.0}
|
|
BuildRequires: %{python_module poetry-core}
|
|
BuildRequires: %{python_module pyproject-api >= 1.5.1}
|
|
BuildRequires: %{python_module pytoml >= 0.1}
|
|
BuildRequires: %{python_module re-assert}
|
|
BuildRequires: %{python_module setuptools >= 41.0.1}
|
|
BuildRequires: %{python_module setuptools_scm >= 2.0.0}
|
|
BuildRequires: %{python_module time-machine}
|
|
BuildRequires: %{python_module tomli >= 2.0.1}
|
|
BuildRequires: %{python_module virtualenv >= 20.21.0}
|
|
BuildRequires: %{python_module wheel >= 0.29.0}
|
|
%if %{with devpi_process}
|
|
BuildRequires: %{python_module devpi-process}
|
|
%endif
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: unzip
|
|
BuildRequires: (python3-importlib-metadata >= 0.12 if python3-base < 3.8)
|
|
BuildRequires: (python36-importlib-metadata >= 0.12 if python36-base)
|
|
Requires: python-cachetools
|
|
Requires: python-chardet
|
|
Requires: python-colorama
|
|
Requires: python-filelock >= 3.0.0
|
|
Requires: python-packaging >= 14
|
|
Requires: python-platformdirs >= 3.5.1
|
|
Requires: python-pluggy >= 1.0.0
|
|
Requires: python-pyproject-api
|
|
Requires: python-tomli >= 2.0.1
|
|
Requires: python-virtualenv >= 20.0.8
|
|
Requires: (python-importlib-metadata >= 0.12 if python3-base < 3.8)
|
|
Requires(post): update-alternatives
|
|
Requires(postun):update-alternatives
|
|
# last detox version is 0.19
|
|
Obsoletes: python-detox <= 0.19
|
|
Provides: python-detox > 0.19
|
|
BuildArch: noarch
|
|
# SECTION setup.cfg [options.extras_requires] testing=
|
|
# (except for pytest-cov and -randomly)
|
|
BuildRequires: %{python_module flaky >= 3.4.0}
|
|
BuildRequires: %{python_module freezegun >= 0.3.11}
|
|
BuildRequires: %{python_module numpy >= 1.25}
|
|
BuildRequires: %{python_module psutil >= 5.6.1}
|
|
BuildRequires: %{python_module pytest >= 4.0.0}
|
|
BuildRequires: %{python_module pytest-mock >= 1.10.0}
|
|
BuildRequires: %{python_module pytest-randomly >= 3.0.0}
|
|
BuildRequires: %{python_module pytest-xdist >= 1.22.2}
|
|
# /SECTION
|
|
%if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3"
|
|
Provides: tox = %{version}
|
|
%endif
|
|
%python_subpackages
|
|
|
|
%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
|
|
%setup -q -n tox-%{version}
|
|
%if %{without devpi_process}
|
|
%patch0 -p1
|
|
%endif
|
|
%patch1 -p1
|
|
|
|
%build
|
|
export LANG=en_US.UTF8
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
export LANG=en_US.UTF8
|
|
%pyproject_install
|
|
%python_clone -a %{buildroot}%{_bindir}/tox
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
# Ignores for gh#tox-dev/tox#1293 -- these tests want to install specific wheels (including pytest) into tox envs
|
|
# Upstream suggests to provide them manually to avoid downloading, but with indirect dependencies the number of
|
|
# wheels is too large. Plus, defining PIP_NO_INDEX PIP_FIND_LINKS as suggested will be deprecated in a future
|
|
# pip and it does not propagate to the test calling pip themselves without patching.
|
|
# enscons are not packaged
|
|
donttest+=" or test_provision_missing or test_provision_interrupt_child or test_provision_from_pyvenv"
|
|
donttest+=" or test_provision_cli_args_ignore or test_provision_non_canonical_dep"
|
|
donttest+=" or test_test_usedevelop"
|
|
donttest+=" or test_different_config_cwd"
|
|
donttest+=" or test_toxuone_env"
|
|
donttest+=" or test_isolated_build_backend_missing_hook"
|
|
donttest+=" or test_parallel_live or (test_parallel and not test_parallel_)"
|
|
# gh#tox-dev/tox#3011
|
|
donttest+=" or test_replace_env_var_circular_flip_flop"
|
|
#
|
|
donttest+=" or test_call_as_exe or test_skip_pkg_install"
|
|
donttest+=" or test_python_generate_hash_seed"
|
|
# this test doesn't work on aarch64
|
|
donttest+=" or test_bad_env_var"
|
|
|
|
%{python_expand # tests expect an active virtualenv with a clean python name as sys.executable
|
|
virtualenv-%{$python_bin_suffix} --system-site-packages testenv-%{$python_bin_suffix}
|
|
source testenv-%{$python_bin_suffix}/bin/activate
|
|
pip install --no-deps ./build/tox*.whl
|
|
python -B -m pytest -v -m "not network" -k "not (${donttest:4})" -n auto
|
|
deactivate
|
|
}
|
|
|
|
%post
|
|
%python_install_alternative tox
|
|
|
|
%postun
|
|
%python_uninstall_alternative tox
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc README.md
|
|
%python_alternative %{_bindir}/tox
|
|
%{python_sitelib}/tox-%{version}*-info
|
|
%{python_sitelib}/tox
|
|
|
|
%changelog
|