Compare commits

..

28 commits

Author SHA1 Message Date
Fedora Release Engineering
3addeaf57b Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-16 22:18:54 +00:00
Python Maint
295e9bbff1 Rebuilt for Python 3.15 2026-06-03 23:37:27 +02:00
Miro Hrončok
d827461ac7 Update to 4.53.1
- Requires packaging >= 26 and virtualenv >= 21.1
- Adds manual page
- Adds optional shell completion (tox+completion package), installed by default
- Fixes: rhbz#2440111
2026-05-05 18:09:40 +02:00
Miro Hrončok
b45d746d3e Adjust for virtualenv 21 API changes 2026-03-06 17:01:58 +01:00
Miro Hrončok
43797b10de Update to 4.35.0
- Fixes: rhbz#2439637

The removed part of fix-tests.patch landed upstream
in https://github.com/tox-dev/tox/pull/3673
2026-02-13 12:21:13 +01:00
Miro Hrončok
83ad569efe Macronize getting versions of Python packages in %check
[skip changelog]
2026-02-13 12:21:13 +01:00
Miro Hrončok
f77c181570 Remove Recommends for Pythons that already Supplement tox
$ repoquery -q --repo=rawhide --whatsupplements tox | pkgname | sort -u
    pypy3.10-devel
    pypy3.11-devel
    python3-devel
    python3.10-devel
    python3.11-devel
    python3.12-devel
    python3.13-devel
    python3.14-freethreading-devel
    python3.15-devel
    python3.15-freethreading-devel

    $ repoquery -q --repo=fedora --releasever 42 --whatsupplements tox | pkgname | sort -u
    pypy3.10-devel
    pypy3.11-devel
    python3-devel
    python3.10-devel
    python3.11-devel
    python3.12-devel
    python3.14-devel

[skip changelog]
2026-02-13 12:21:13 +01:00
Miro Hrončok
2550033b07 CI: Test tox -e py36 without explicit requirement for old virtualenv
The "native" support landed in https://src.fedoraproject.org/rpms/python-virtualenv/c/474b4b263e

[skip changelog]
2026-01-20 20:53:33 +01:00
Miro Hrončok
46c8a3f420 CI: Drop Python 2.7 completely
Fedora 41 was the last one to have it and it is EOL.

[skip changelog]
2026-01-20 20:53:33 +01:00
Miro Hrončok
d79d40d8d0 Update to 4.34.1
- Fixes: rhbz#2428038
2026-01-20 20:45:17 +01:00
Fedora Release Engineering
c0896351ce Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 10:12:45 +00:00
Miro Hrončok
eb2fd83e5a Update to 4.33.0
- Fixes: rhbz#2426906
2026-01-05 16:23:09 +01:00
Miro Hrončok
de396d650b CI: Fix all_supplementing_pythons wrt. freethreading Pythons
[skip changelog]
2026-01-05 16:23:09 +01:00
Miro Hrončok
bfcb4db415 Move test dependencies removal from fix-tests.patch to a sed
That way, the patch is easier applied for future rebases.

pyproject.toml after %prep is identical to what it was before this commit.

[skip changelog]
2025-11-10 11:21:19 +01:00
Miro Hrončok
91ed59fa8e Update to 4.32.0
- Fixes: rhbz#2406240
2025-11-06 11:59:18 +01:00
Miro Hrončok
b9bd279702 Adjust the sed in %prep to unpin all test deps
[skip changelog]
2025-11-06 11:58:58 +01:00
Karolina Surma
f8840a782c CI: Run tests with Python 3.15
[skip changelog]
2025-10-24 13:03:27 +02:00
Miro Hrončok
4685d09abf Update to 4.30.3
- Fixes: rhbz#2393223
2025-10-06 23:25:05 +02:00
Miro Hrončok
6e8b540f1f Revert "Fix build in ELN"
This reverts commit ddf7ecd3d8.

No longer needed due to https://src.fedoraproject.org/rpms/python-build/c/4a39a0b151

[skip changelog]
2025-09-24 11:32:43 +00:00
Python Maint
661fadce9e Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 14:38:08 +02:00
Miro Hrončok
a8537e2385 Update to 4.30.1
- Fixes: rhbz#2382185

pluggy 1.5 seems to be actually needed for
https://github.com/tox-dev/tox/pull/3560
2025-09-04 12:37:12 +02:00
Miro Hrončok
ddf7ecd3d8 Fix build in ELN
[skip changelog]
2025-09-04 12:37:12 +02:00
Lukáš Zachar
a0c7d6d2fb Change all_supplementing_pythons to work with tmt
If there are no special fmf features used, fmf is a plain yaml.
Which is case here so there is no need to use 'fmf' to parse plan.fmf
2025-09-02 09:36:21 +00:00
Lukáš Zachar
1a0b1cd795 Drop STI and use tmt instead
Resolve: rhbz#2383050
2025-09-02 09:36:21 +00:00
Python Maint
49e309bd91 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 15:02:28 +02:00
Fedora Release Engineering
36ce30e49c Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 10:49:59 +00:00
Python Maint
728b50e059 Rebuilt for Python 3.14 2025-06-03 18:22:04 +02:00
Python Maint
873d91a173 Bootstrap for Python 3.14 2025-06-03 00:40:09 +02:00
7 changed files with 193 additions and 200 deletions

1
.fmf/version Normal file
View file

@ -0,0 +1 @@
1

View file

@ -1,4 +1,4 @@
From 924b03e0446561bbfca9679a44642a1a96dd8f10 Mon Sep 17 00:00:00 2001
From 49a830fa59f9cbc58920b5052f47089cff2685e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
Date: Fri, 28 Mar 2025 09:44:24 +0100
Subject: [PATCH] Fix tests
@ -9,55 +9,31 @@ Content-Transfer-Encoding: 8bit
Co-Authored-By: Lumir Balhar <lbalhar@redhat.com>
Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
---
pyproject.toml | 11 +----------
src/tox/pytest.py | 16 +++-------------
tests/test_provision.py | 18 ++----------------
.../package/test_python_package_util.py | 10 ++++++++--
4 files changed, 14 insertions(+), 41 deletions(-)
pyproject.toml | 3 ---
src/tox/pytest.py | 14 ++------------
tests/test_provision.py | 11 ++++-------
.../package/test_python_package_util.py | 10 ++++++++--
4 files changed, 14 insertions(+), 24 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 9b52c2f..335012b 100644
index c9ca99c..3a74d6f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -82,22 +82,16 @@ dev = [
]
test = [
"build[virtualenv]>=1.2.2.post1",
- "covdefaults>=2.3",
- "detect-test-pollution>=1.2",
- "devpi-process>=1.0.2",
- "diff-cover>=9.2",
"distlib>=0.3.9",
"flaky>=3.8.1",
"hatch-vcs>=0.4",
"hatchling>=1.27",
"psutil>=6.1.1",
"pytest>=8.3.4",
- "pytest-cov>=5",
"pytest-mock>=3.14",
"pytest-xdist>=3.6.1",
"re-assert>=1.1",
- "setuptools>=75.3; python_version<='3.8'",
- "setuptools>=75.8; python_version>'3.8'",
+ "setuptools>=75.1",
"time-machine>=2.15; implementation_name!='pypy'",
"wheel>=0.45.1",
]
@@ -223,9 +217,6 @@ report.omit = [
"tests/type_check/*",
]
@@ -239,9 +239,6 @@ ini_options.timeout = 30
[tool.coverage]
run.parallel = true
-run.plugins = [
- "covdefaults",
-]
[tool.towncrier]
name = "tox"
paths.source = [
"src",
".tox*/*/lib/python*/site-packages",
diff --git a/src/tox/pytest.py b/src/tox/pytest.py
index bca2ad8..973e714 100644
index 36aa2f6..7693523 100644
--- a/src/tox/pytest.py
+++ b/src/tox/pytest.py
@@ -17,7 +17,6 @@ from typing import TYPE_CHECKING, Any, Callable, Iterator, Protocol, Sequence, c
@@ -17,7 +17,6 @@ from typing import TYPE_CHECKING, Any, Protocol, cast
import pytest
from _pytest.fixtures import SubRequest # noqa: PLC2701
@ -65,21 +41,18 @@ index bca2ad8..973e714 100644
from virtualenv.info import fs_supports_symlink
import tox.run
@@ -280,10 +279,10 @@ class ToxProject:
@@ -285,8 +284,8 @@ class ToxProject:
m.setattr(sys, "argv", [sys.executable, "-m", "tox", *list(args)])
m.setenv("VIRTUALENV_SYMLINK_APP_DATA", "1")
m.setenv("VIRTUALENV_SYMLINKS", "1")
- m.setenv("VIRTUALENV_PIP", "embed")
+ m.setenv("VIRTUALENV_PIP", "bundle")
if sys.version_info[:2] < (3, 9):
- m.setenv("VIRTUALENV_WHEEL", "embed")
- m.setenv("VIRTUALENV_SETUPTOOLS", "embed")
+ m.setenv("VIRTUALENV_WHEEL", "bundle")
+ m.setenv("VIRTUALENV_PIP", "bundle")
+ m.setenv("VIRTUALENV_SETUPTOOLS", "bundle")
try:
tox_run(args)
except SystemExit as exception:
@@ -476,15 +475,6 @@ def enable_pypi_server(monkeypatch: pytest.MonkeyPatch, url: str | None) -> None
@@ -480,15 +479,6 @@ def enable_pypi_server(monkeypatch: pytest.MonkeyPatch, url: str | None) -> None
monkeypatch.setenv("PIP_TIMEOUT", str(2))
@ -96,35 +69,30 @@ index bca2ad8..973e714 100644
def _invalid_index_fake_port() -> int:
with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as socket_handler:
diff --git a/tests/test_provision.py b/tests/test_provision.py
index 2030cb9..f706d6c 100644
index 74c27b9..12c99be 100644
--- a/tests/test_provision.py
+++ b/tests/test_provision.py
@@ -98,22 +98,9 @@ def tox_wheels(tox_wheel: Path, tmp_path_factory: TempPathFactory) -> list[Path]
return result
@@ -127,15 +127,13 @@ def _use_pypi_index(pypi_index: Index, monkeypatch: MonkeyPatch) -> None:
-@pytest.fixture(scope="session")
-def pypi_index_self(pypi_server: IndexServer, tox_wheels: list[Path], demo_pkg_inline_wheel: Path) -> Index:
- with elapsed("start devpi and create index"): # takes around 1s
- self_index = pypi_server.create_index("self", "volatile=False")
- with elapsed("upload tox and its wheels to devpi"): # takes around 3.2s on build
- self_index.upload(*tox_wheels, demo_pkg_inline_wheel)
- return self_index
-
-
@pytest.fixture
-def _pypi_index_self(pypi_index_self: Index, monkeypatch: MonkeyPatch) -> None:
- pypi_index_self.use()
- monkeypatch.setenv("PIP_INDEX_URL", pypi_index_self.url)
- monkeypatch.setenv("PIP_RETRIES", str(2))
- monkeypatch.setenv("PIP_TIMEOUT", str(5))
-
+def _pypi_index_self():
-def _pypi_index_mirrored(local_pypi_indexes: tuple[Index, Index], monkeypatch: MonkeyPatch) -> None:
- pypi_index_mirrored, _ = local_pypi_indexes
- _use_pypi_index(pypi_index_mirrored, monkeypatch)
+def _pypi_index_mirrored() -> None:
+ pytest.skip("needs devpi-process")
@pytest.fixture
-def _pypi_index_self(local_pypi_indexes: tuple[Index, Index], monkeypatch: MonkeyPatch) -> None:
- _, pypi_index_self = local_pypi_indexes
- _use_pypi_index(pypi_index_self, monkeypatch)
+def _pypi_index_self() -> None:
+ pytest.skip("needs devpi-process")
def test_provision_requires_nok(tox_project: ToxProjectCreator) -> None:
ini = "[tox]\nrequires = pkg-does-not-exist\n setuptools==1\nskipsdist=true\n"
@@ -161,7 +148,6 @@ def test_provision_requires_ok(tox_project: ToxProjectCreator, tmp_path: Path) -
@@ -213,7 +211,6 @@ def test_provision_requires_ok(tox_project: ToxProjectCreator, tmp_path: Path) -
@pytest.mark.integration
@ -133,10 +101,10 @@ index 2030cb9..f706d6c 100644
ini = "[tox]\nrequires=demo-pkg-inline\n[testenv]\npackage=skip\n[testenv:.tox]\nplatform=wrong_platform"
proj = tox_project({"tox.ini": ini})
diff --git a/tests/tox_env/python/virtual_env/package/test_python_package_util.py b/tests/tox_env/python/virtual_env/package/test_python_package_util.py
index efb5b12..8a57426 100644
index 4c834ce..74b04f5 100644
--- a/tests/tox_env/python/virtual_env/package/test_python_package_util.py
+++ b/tests/tox_env/python/virtual_env/package/test_python_package_util.py
@@ -15,6 +15,12 @@ if TYPE_CHECKING:
@@ -16,6 +16,12 @@ if TYPE_CHECKING:
from importlib.metadata import Distribution, PathDistribution
@ -149,10 +117,10 @@ index efb5b12..8a57426 100644
@pytest.fixture(scope="session")
def pkg_with_extras(pkg_with_extras_project: Path) -> PathDistribution:
@@ -43,10 +49,10 @@ def test_load_dependency_many_extra(pkg_with_extras: PathDistribution) -> None:
@@ -44,10 +50,10 @@ def test_load_dependency_many_extra(pkg_with_extras: PathDistribution) -> None:
exp = [
Requirement("platformdirs>=2.1"),
Requirement("colorama>=0.4.3"),
Requirement("platformdirs>=4.3.8"),
Requirement("colorama>=0.4.6"),
- *(sphinx if sys.version_info[0:2] <= (3, 8) else []),
+ *(sphinx if not SETUPTOOLS_75_6 else []),
Requirement(f'covdefaults>=1.2; python_version == "2.7" or python_version == "{py_ver}"'),
@ -163,5 +131,5 @@ index efb5b12..8a57426 100644
for left, right in zip_longest(result, exp):
assert isinstance(right, Requirement)
--
2.49.0
2.54.0

99
plan.fmf Normal file
View file

@ -0,0 +1,99 @@
execute:
how: tmt
discover:
- name: rpms_pyproject-rpm-macros
how: shell
url: https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git
tests:
- name: pyproject_pytest
path: /tests
test: ./mocktest.sh python-pytest
- name: pyproject_pluggy
path: /tests
test: ./mocktest.sh python-pluggy
- name: pyproject_openqa_client
path: /tests
test: ./mocktest.sh python-openqa_client
- name: same_repo
how: shell
dist-git-source: true
dist-git-download-only: true
tests:
- name: all_supplementing_pythons
test: ./tests/all_supplementing_pythons.py
- name: mock_with_tests
# Needs cwd to contain downloaded sources, path to mocktes.sh depends on tmt tree structure
test: |
cd $TMT_SOURCE_DIR &&
$TMT_TREE/../discover/rpms_pyproject-rpm-macros/tests/tests/mocktest.sh python-tox --enable-network --with ci_tests
- name: tests_python
how: shell
url: https://src.fedoraproject.org/tests/python.git
tests:
- name: smoke36
path: /smoke
test: VERSION=3.6 INSTALL_OR_SKIP=true ./venv.sh
- name: smoke39
path: /smoke
test: VERSION=3.9 INSTALL_OR_SKIP=true ./venv.sh
- name: smoke310
path: /smoke
test: VERSION=3.10 INSTALL_OR_SKIP=true ./venv.sh
- name: smoke311
path: /smoke
test: VERSION=3.11 INSTALL_OR_SKIP=true ./venv.sh
- name: smoke312
path: /smoke
test: VERSION=3.12 ./venv.sh
- name: smoke313
path: /smoke
test: VERSION=3.13 INSTALL_OR_SKIP=true ./venv.sh
- name: smoke313t
path: /smoke
test: VERSION=3.13t INSTALL_OR_SKIP=true ./venv.sh
- name: smoke314
path: /smoke
test: VERSION=3.14 INSTALL_OR_SKIP=true ./venv.sh
- name: smoke314t
path: /smoke
test: VERSION=3.14t INSTALL_OR_SKIP=true ./venv.sh
- name: smoke315
path: /smoke
test: VERSION=3.15 INSTALL_OR_SKIP=true ./venv.sh
- name: smoke315t
path: /smoke
test: VERSION=3.15t INSTALL_OR_SKIP=true ./venv.sh
- name: smoke_pypy39
path: /smoke
test: PYTHON=pypy3.9 VERSION=3.9 INSTALL_OR_SKIP=true ./venv.sh
- name: smoke_pypy310
path: /smoke
test: PYTHON=pypy3.10 VERSION=3.10 INSTALL_OR_SKIP=true ./venv.sh
- name: smoke_pypy311
path: /smoke
test: PYTHON=pypy3.11 VERSION=3.11 INSTALL_OR_SKIP=true ./venv.sh
prepare:
- name: Install dependencies
how: install
package:
- gcc
- virtualenv
- python3-devel
- python3.12-devel
- python3-tox
- python3-dnf
- mock
- rpmdevtools
- rpm-build
- python3-pyyaml
- rpm
- dnf
- name: Update packages
how: shell
script: dnf upgrade -y
- name: rpm_qa
order: 100
how: shell
script: rpm -qa | sort | tee $TMT_PLAN_DATA/rpmqa.txt

View file

@ -20,7 +20,7 @@
%undefine _py3_shebang_s
Name: python-tox
Version: 4.26.0
Version: 4.53.1
Release: %autorelease
Summary: Virtualenv-based automation of test activities
@ -28,9 +28,8 @@ License: MIT
URL: https://tox.readthedocs.io/
Source: %{pypi_source tox}
# Remove dependency on devpi-process.
# Remove dependency on detect-test-pollution.
# Remove coverage-related dependencies.
# Remove usage of devpi-process.
# Remove coverage options.
# Adjust virtualenv environment variables to make it work with our patched virtualenv.
# Adjust setuptools-version specific ifs to check for setuptools version rather than Python version.
Patch: fix-tests.patch
@ -44,6 +43,7 @@ BuildRequires: pyproject-rpm-macros >= 1.16
%if %{with tests}
BuildRequires: /usr/bin/gcc
BuildRequires: /usr/bin/git
BuildRequires: /usr/bin/man
BuildRequires: /usr/bin/pip
BuildRequires: /usr/bin/pytest
BuildRequires: /usr/bin/python
@ -84,13 +84,13 @@ Summary: %{summary}
# the rule that Fedora packages may not require the alternative interpreters.)
%if 0%{?fedora}
Recommends: python3.9
Recommends: python3.10
Recommends: pypy3-devel
%endif
Recommends: python3-devel
# Instead of adding new Pythons here, add `Supplements: tox` to them, see:
# https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org/thread/NVVUXSVSPFQOWIGBE2JNI67HEO7R63ZQ/
# Enable completions by default
Recommends: (tox+completion if (bash-completion or fish or zsh))
%py_provides python3-tox
%description -n tox %_description
@ -101,15 +101,19 @@ Recommends: python3-devel
# Upstream updates dependencies too aggressively
# see https://github.com/tox-dev/tox/pull/2843#discussion_r1065028356
sed -ri -e 's/"(packaging|filelock|platformdirs|psutil|pyproject-api|pytest|pytest-mock|pytest-xdist|wheel|pluggy|distlib|cachetools|build\[virtualenv\]|setuptools|flaky)>=.*/"\1",/g' \
-e 's/"(time-machine)>=[^;"]+/"\1/' \
-e 's/"(virtualenv)>=.*/"\1>=20.29",/g' \
# First, carefully adjust the pins of build and runtime dependencies,
# then remove all the >= specifiers from tests deps, whatever they are,
# finally, remove undesired test dependencies.
sed -ri -e 's/"(filelock|platformdirs|pyproject-api|cachetools|hatch-vcs)>=.*/"\1",/g' \
-e 's/"(hatchling)>=.*/"\1>=1.13",/g' \
-e 's/"(pluggy)>=.*/"\1>=1.5",/g' \
-e '/^test = \[/,/^\]/ { s/>=[^;"]+// }' \
-e '/^test = \[/,/^\]/ { /"(covdefaults|coverage|detect-test-pollution|devpi-process|diff-cover|pytest-cov)[;"]/d }' \
pyproject.toml
%generate_buildrequires
export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}"
%pyproject_buildrequires -r %{?with_tests:-g test}
%pyproject_buildrequires -r %{?with_tests:-g test} -x completion
%build
@ -121,14 +125,20 @@ export SETUPTOOLS_SCM_PRETEND_VERSION="%{version}"
%pyproject_install
%pyproject_save_files tox
for shell in bash fish zsh; do
register-python-argcomplete --shell $shell tox > tox.$shell
done
# The bash-completion package has tox already, we use the .bash suffix,
# see https://github.com/scop/bash-completion/issues/1628#issuecomment-4380971779
install -Dpm 0644 tox.bash %{buildroot}%{bash_completions_dir}/tox.bash
install -Dpm 0644 tox.fish %{buildroot}%{fish_completions_dir}/tox.fish
install -Dpm 0644 tox.zsh %{buildroot}%{zsh_completions_dir}/_tox
%if %{with tests}
%check
# Upstream requires virtualenv >= 20.31 for tests, and no longer sets VIRTUALENV_WHEEL.
# To support environments with older virtualenv, we set it manually:
%if v"%(%{python3} -c 'import importlib.metadata as im; print(im.version("virtualenv"))' 2>/dev/null || echo 0)" < v"20.31"
export VIRTUALENV_WHEEL=bundle
%endif
# A macro that returns a version of the installed Python package, as an RPM v-string, defaults to v"0"
%define pyversion() v"%(%{python3} -c 'import importlib.metadata as im; print(im.version("%{1}"))' 2>/dev/null || echo 0)"
# Skipped tests use internal virtualenv functionality to
# download wheels which does not work with "bundled" version of wheel in
@ -137,21 +147,13 @@ k="${k-}${k+ and }not test_virtualenv_flipped_settings"
k="${k-}${k+ and }not test_virtualenv_env_ignored_if_set"
k="${k-}${k+ and }not test_virtualenv_env_used_if_not_set"
# https://github.com/tox-dev/tox/issues/3290
%if v"0%{?python3_version}" >= v"3.13"
k="${k-}${k+ and }not test_str_convert_ok_py39"
%endif
# https://github.com/tox-dev/tox/commit/698f1dd663
# The tests fail with setuptools < 70.1
%if v"%(%{python3} -c 'import importlib.metadata as im; print(im.version("setuptools"))' 2>/dev/null || echo 0)" < v"70.1"
%if %{pyversion setuptools} < v"70.1"
k="${k-}${k+ and }not test_result_json_sequential"
k="${k-}${k+ and }not test_setuptools_package"
k="${k-}${k+ and }not test_skip_develop_mode"
k="${k-}${k+ and }not test_tox_install_pkg_sdist"
%else
# this test fails with virtualenv < 20.31 with bundled wheel
test -z $VIRTUALENV_WHEEL || k="${k-}${k+ and }not test_result_json_sequential"
%endif
# The following tests either need internet connection or installed tox
@ -162,7 +164,10 @@ k="${k-}${k+ and }not keyboard_interrupt"
k="${k-}${k+ and }not test_call_as_module"
k="${k-}${k+ and }not test_call_as_exe"
k="${k-}${k+ and }not test_run_installpkg_targz"
test -z $VIRTUALENV_WHEEL && k="${k-}${k+ and }not test_result_json_sequential"
k="${k-}${k+ and }not test_pyproject_installpkg_pep517_envs"
k="${k-}${k+ and }not test_pylock_install_integration"
k="${k-}${k+ and }not test_interrupt_post_commands"
k="${k-}${k+ and }not test_second_interrupt_stops_post_commands"
%endif
%pytest -v -n auto -k "${k-}" --run-integration
@ -171,6 +176,12 @@ test -z $VIRTUALENV_WHEEL && k="${k-}${k+ and }not test_result_json_sequential"
%files -n tox -f %{pyproject_files}
%{_bindir}/tox
%{_mandir}/man1/tox.1*
%pyproject_extras_subpkg -n tox completion
%{bash_completions_dir}/tox.bash
%{fish_completions_dir}/tox.fish
%{zsh_completions_dir}/_tox
%changelog

View file

@ -1 +1 @@
SHA512 (tox-4.26.0.tar.gz) = ad2e311cd63c45a079b8c230a2feb364270b7a8bcf44b626385f8e442c6683ae841b3f34417b504f927608685a254fef3767d832fb5cfcc324c9cbf6ff7ea997
SHA512 (tox-4.53.1.tar.gz) = b11df73e47c5c63124b9e7e11c44a8c3c39b40d177b411bcbd4218a9875fd658a32712083102ef2a1cae6e75939cd32f7caa00551de753f30f58f7f52ab4e5dd

View file

@ -8,7 +8,7 @@ See https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproje
This script:
1) figures out all packages in the enabled repositories supplementing tox
2) ensures there is a venv.sh test for each of them in tests.yml
2) ensures there is a venv.sh test for each of them in plan.fmf
That way, when we change tox (update, patch, etc.),
we will always test it with all Pythons that supplement it.
@ -34,16 +34,18 @@ def parse_python_test_arg(command):
# First, construct a set of various Pythons we test, e.g. {python3.10, python3.7, pypy3.6, ...}
tested_pythons = set()
with open('tests.yml') as f:
tests_yml = yaml.safe_load(f)
with open('plan.fmf') as f:
plan_fmf = yaml.safe_load(f)
# this nested structure access is quite fragile,
# but at least it should fail the test if we reach to a wrong place
for test in tests_yml[-1]['roles'][0]['tests']:
for value in test.values():
run = value['run']
if run.endswith('./venv.sh'):
tested_pythons.add(parse_python_test_arg(run))
print('Tested Pythons found in tests.yml:', file=sys.stderr)
for discover_section in plan_fmf['discover']:
if discover_section['name'] != 'tests_python':
continue
for test in discover_section['tests']:
test_cmd = test['test']
if test_cmd.endswith('./venv.sh'):
tested_pythons.add(parse_python_test_arg(test_cmd))
print('Tested Pythons found in plan.fmf:', file=sys.stderr)
for python in sorted(tested_pythons):
print(' ', python, file=sys.stderr)
@ -64,10 +66,13 @@ for nvra in supplementing_pkgs:
# We use this hack to treat -devel and -libs packages as if they were not such
# We also convert the freethreading packages to the exectuable name
def normalize_name(pkgname):
for suffix in '-devel', '-libs':
if pkgname.endswith(suffix):
return pkgname.removesuffix(suffix)
pkgname = pkgname.removesuffix(suffix)
if pkgname.endswith('-freethreading'):
pkgname = pkgname.removesuffix('-freethreading') + 't'
return pkgname

View file

@ -1,91 +0,0 @@
---
- hosts: localhost
tags:
- classic
tasks:
- dnf:
name: "*"
state: latest
- hosts: localhost
tags:
- classic
pre_tasks:
- import_role:
name: standard-test-source
vars:
fetch_only: True
roles:
- role: standard-test-basic
repositories:
- repo: "https://src.fedoraproject.org/tests/python.git"
dest: "python"
- repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git"
dest: "pyproject-rpm-macros"
tests:
- mock_with_tests:
dir: .
run: pyproject-rpm-macros/tests/mocktest.sh python-tox --enable-network --with ci_tests
- all_supplementing_pythons:
dir: tests
run: ./all_supplementing_pythons.py
- smoke27:
dir: python/smoke
run: VERSION=2.7 INSTALL_OR_SKIP=true METHOD=virtualenv TOX_REQUIRES="virtualenv<20.22.0" ./venv.sh
- smoke36:
dir: python/smoke
run: VERSION=3.6 INSTALL_OR_SKIP=true TOX_REQUIRES="virtualenv<20.22.0" ./venv.sh
- smoke39:
dir: python/smoke
run: VERSION=3.9 INSTALL_OR_SKIP=true ./venv.sh
- smoke310:
dir: python/smoke
run: VERSION=3.10 INSTALL_OR_SKIP=true ./venv.sh
- smoke311:
dir: python/smoke
run: VERSION=3.11 INSTALL_OR_SKIP=true ./venv.sh
- smoke312:
dir: python/smoke
run: VERSION=3.12 ./venv.sh
- smoke313:
dir: python/smoke
run: VERSION=3.13 INSTALL_OR_SKIP=true ./venv.sh
- smoke313t:
dir: python/smoke
run: VERSION=3.13t INSTALL_OR_SKIP=true ./venv.sh
- smoke314:
dir: python/smoke
run: VERSION=3.14 INSTALL_OR_SKIP=true ./venv.sh
- smoke314t:
dir: python/smoke
run: VERSION=3.14t INSTALL_OR_SKIP=true ./venv.sh
- smoke_pypy39:
dir: python/smoke
run: PYTHON=pypy3.9 VERSION=3.9 INSTALL_OR_SKIP=true ./venv.sh
- smoke_pypy310:
dir: python/smoke
run: PYTHON=pypy3.10 VERSION=3.10 INSTALL_OR_SKIP=true ./venv.sh
- smoke_pypy311:
dir: python/smoke
run: PYTHON=pypy3.11 VERSION=3.11 INSTALL_OR_SKIP=true ./venv.sh
- pyproject_pytest:
dir: pyproject-rpm-macros/tests
run: ./mocktest.sh python-pytest
- pyproject_pluggy:
dir: pyproject-rpm-macros/tests
run: ./mocktest.sh python-pluggy
- pyproject_openqa_client:
dir: pyproject-rpm-macros/tests
run: ./mocktest.sh python-openqa_client
required_packages:
- gcc
- virtualenv
- python3-devel
- python3.12-devel
- python3-tox
- python3-dnf
- mock
- rpmdevtools
- rpm-build
- python3-pyyaml