From 0fbeef6ce6dae1384cbc0d1a28e87ccf02da8d365977777930ecfcd47f9d82ae Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 5 May 2023 14:45:01 +0000 Subject: [PATCH 1/8] - Update to 4.5.1: The amount of changes is so huge, that user is kindly referred to the packaged changelog. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tox?expand=0&rev=96 --- python-tox.changes | 7 +++++++ python-tox.spec | 21 ++++++++++++++------- tox-3.26.0.tar.gz | 3 --- tox-4.5.1.tar.gz | 3 +++ 4 files changed, 24 insertions(+), 10 deletions(-) delete mode 100644 tox-3.26.0.tar.gz create mode 100644 tox-4.5.1.tar.gz diff --git a/python-tox.changes b/python-tox.changes index ba912ee..fd1e806 100644 --- a/python-tox.changes +++ b/python-tox.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri May 5 14:30:53 UTC 2023 - Matej Cepl + +- Update to 4.5.1: + The amount of changes is so huge, that user is kindly referred + to the packaged changelog. + ------------------------------------------------------------------- Fri Apr 21 12:37:47 UTC 2023 - Dirk Müller diff --git a/python-tox.spec b/python-tox.spec index e61eeef..f8f0aed 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -15,28 +15,35 @@ # Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %{?sle15_python_module_pythons} Name: python-tox -Version: 3.26.0 +Version: 4.5.1 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 -BuildRequires: %{python_module backports.entry_points_selectable >= 1.0.4} -BuildRequires: %{python_module filelock >= 3.0.0} -BuildRequires: %{python_module packaging >= 14} +Source: https://github.com/tox-dev/tox/archive/refs/tags/%{version}.tar.gz#/tox-%{version}.tar.gz +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 hatchling >= 1.14} +BuildRequires: %{python_module packaging >= 23.1} BuildRequires: %{python_module pip} -BuildRequires: %{python_module pluggy >= 0.12.0} +BuildRequires: %{python_module platformdirs >= 3.2} +BuildRequires: %{python_module pluggy >= 1.0.0} BuildRequires: %{python_module poetry-core} BuildRequires: %{python_module py >= 1.4.17} +BuildRequires: %{python_module pyproject-api >= 1.5.1} BuildRequires: %{python_module pytoml >= 0.1} BuildRequires: %{python_module setuptools >= 41.0.1} BuildRequires: %{python_module setuptools_scm >= 2.0.0} BuildRequires: %{python_module six >= 1.14.0} BuildRequires: %{python_module toml >= 0.9.4} BuildRequires: %{python_module tomli >= 2.0.1} -BuildRequires: %{python_module virtualenv >= 20.0.8} +BuildRequires: %{python_module virtualenv >= 20.21.0} BuildRequires: %{python_module wheel >= 0.29.0} BuildRequires: fdupes BuildRequires: python-rpm-macros diff --git a/tox-3.26.0.tar.gz b/tox-3.26.0.tar.gz deleted file mode 100644 index 50b8697..0000000 --- a/tox-3.26.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:44f3c347c68c2c68799d7d44f1808f9d396fc8a1a500cbc624253375c7ae107e -size 319768 diff --git a/tox-4.5.1.tar.gz b/tox-4.5.1.tar.gz new file mode 100644 index 0000000..18ab14c --- /dev/null +++ b/tox-4.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6bf37c10479bf1335cfc70919a6030e0bc145f0029bcc6da505b38c92e36fd94 +size 306426 From 988f896c70470826574789356d0ecc847b3536612f1a30364dd14bf03e08cad6 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 10 May 2023 20:05:27 +0000 Subject: [PATCH 2/8] - Add mark-network-tests.patch to skip test which require network access OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tox?expand=0&rev=97 --- mark-network-tests.patch | 27 +++++++++++++++++++++++ optional_devpi_process.patch | 42 ++++++++++++++++++++++++++++++++++++ python-tox.changes | 2 ++ python-tox.spec | 24 +++++++++++++++------ tox-4.5.1.tar.gz | 4 ++-- 5 files changed, 91 insertions(+), 8 deletions(-) create mode 100644 mark-network-tests.patch create mode 100644 optional_devpi_process.patch diff --git a/mark-network-tests.patch b/mark-network-tests.patch new file mode 100644 index 0000000..0d41e87 --- /dev/null +++ b/mark-network-tests.patch @@ -0,0 +1,27 @@ +--- + pyproject.toml | 3 +++ + tests/tox_env/python/virtual_env/package/test_package_cmd_builder.py | 1 + + 2 files changed, 4 insertions(+) + +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -162,6 +162,9 @@ ignore = [ + [tool.pytest.ini_options] + testpaths = ["tests"] + addopts = "--tb=auto -ra --showlocals --no-success-flaky-report" ++markers = [ ++ "network: tests requiring network connection", ++] + + [tool.towncrier] + name = "tox" +--- a/tests/tox_env/python/virtual_env/package/test_package_cmd_builder.py ++++ b/tests/tox_env/python/virtual_env/package/test_package_cmd_builder.py +@@ -74,6 +74,7 @@ def test_install_pkg_via(tox_project: To + + + @pytest.mark.usefixtures("enable_pip_pypi_access") ++@pytest.mark.network + def test_build_wheel_external(tox_project: ToxProjectCreator, demo_pkg_inline: Path) -> None: + ini = """ + [testenv] diff --git a/optional_devpi_process.patch b/optional_devpi_process.patch new file mode 100644 index 0000000..811c97a --- /dev/null +++ b/optional_devpi_process.patch @@ -0,0 +1,42 @@ +--- + src/tox/pytest.py | 6 +++++- + tests/test_provision.py | 6 +++++- + 2 files changed, 10 insertions(+), 2 deletions(-) + +--- a/src/tox/pytest.py ++++ b/src/tox/pytest.py +@@ -26,7 +26,10 @@ from _pytest.logging import LogCaptureFi + from _pytest.monkeypatch import MonkeyPatch + from _pytest.python import Function + from _pytest.tmpdir import TempPathFactory +-from devpi_process import IndexServer ++try: ++ from devpi_process import IndexServer ++except ImportError: ++ IndexServer = None + from pytest_mock import MockerFixture + from virtualenv.info import fs_supports_symlink + +@@ -473,6 +476,7 @@ def enable_pypi_server(monkeypatch: Monk + + + @pytest.fixture(scope="session") ++@pytest.mark.skipif(IndexServer is None, reason="requires devpi_process") + def pypi_server(tmp_path_factory: TempPathFactory) -> Iterator[IndexServer]: + # takes around 2.5s + path = tmp_path_factory.mktemp("pypi") +--- a/tests/test_provision.py ++++ b/tests/test_provision.py +@@ -12,7 +12,11 @@ from unittest import mock + from zipfile import ZipFile + + import pytest +-from devpi_process import Index, IndexServer ++try: ++ from devpi_process import Index, IndexServer ++except ImportError: ++ Index = None ++ IndexServer = None + from filelock import FileLock + from packaging.requirements import Requirement + diff --git a/python-tox.changes b/python-tox.changes index fd1e806..f683472 100644 --- a/python-tox.changes +++ b/python-tox.changes @@ -4,6 +4,8 @@ Fri May 5 14:30:53 UTC 2023 - Matej Cepl - Update to 4.5.1: The amount of changes is so huge, that user is kindly referred to the packaged changelog. +- Add mark-network-tests.patch to skip test which require network + access ------------------------------------------------------------------- Fri Apr 21 12:37:47 UTC 2023 - Dirk Müller diff --git a/python-tox.spec b/python-tox.spec index f8f0aed..a146422 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -23,12 +23,21 @@ Release: 0 Summary: Virtualenv-based automation of test activities License: MIT URL: https://github.com/tox-dev/tox -Source: https://github.com/tox-dev/tox/archive/refs/tags/%{version}.tar.gz#/tox-%{version}.tar.gz +# Source: https://github.com/tox-dev/tox/archive/refs/tags/%%{version}.tar.gz#/tox-%%{version}.tar.gz +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} @@ -38,9 +47,11 @@ BuildRequires: %{python_module poetry-core} BuildRequires: %{python_module py >= 1.4.17} 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 six >= 1.14.0} +BuildRequires: %{python_module time-machine} BuildRequires: %{python_module toml >= 0.9.4} BuildRequires: %{python_module tomli >= 2.0.1} BuildRequires: %{python_module virtualenv >= 20.21.0} @@ -51,6 +62,7 @@ BuildRequires: unzip BuildRequires: (python3-importlib-metadata >= 0.12 if python3-base < 3.8) BuildRequires: (python36-importlib-metadata >= 0.12 if python36-base) Requires: python-backports.entry_points_selectable >= 1.0.4 +Requires: python-build >= 0.10.0 Requires: python-filelock >= 3.0.0 Requires: python-packaging >= 14 Requires: python-pip @@ -96,7 +108,7 @@ use for: CI and shell-based testing. %prep -%setup -q -n tox-%{version} +%autosetup -p1 -n tox-%{version} %build export LANG=en_US.UTF8 @@ -106,7 +118,6 @@ export LANG=en_US.UTF8 export LANG=en_US.UTF8 %pyproject_install %python_clone -a %{buildroot}%{_bindir}/tox -%python_clone -a %{buildroot}%{_bindir}/tox-quickstart %python_expand %fdupes %{buildroot}%{$python_sitelib} %check @@ -122,6 +133,8 @@ 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" %{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} @@ -132,16 +145,15 @@ deactivate } %post -%python_install_alternative tox tox-quickstart +%python_install_alternative tox %postun %python_uninstall_alternative tox %files %{python_files} %license LICENSE -%doc README.md docs/changelog.rst CONTRIBUTORS CONTRIBUTING.rst +%doc README.md %python_alternative %{_bindir}/tox -%python_alternative %{_bindir}/tox-quickstart %{python_sitelib}/tox-%{version}*-info %{python_sitelib}/tox diff --git a/tox-4.5.1.tar.gz b/tox-4.5.1.tar.gz index 18ab14c..6ec15bd 100644 --- a/tox-4.5.1.tar.gz +++ b/tox-4.5.1.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6bf37c10479bf1335cfc70919a6030e0bc145f0029bcc6da505b38c92e36fd94 -size 306426 +oid sha256:5a2eac5fb816779dfdf5cb00fecbc27eb0524e4626626bb1de84747b24cacc56 +size 170137 From feaea52c7189bfa1cdf76995f9761801f1e1165e7a61fb1306def44eed6c4d68 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 10 May 2023 20:13:37 +0000 Subject: [PATCH 3/8] - Add optional_devpi_process.patch to make the package not depend on devpi_process (which is rather expensive to build). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tox?expand=0&rev=98 --- python-tox.changes | 2 ++ python-tox.spec | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python-tox.changes b/python-tox.changes index f683472..977ab73 100644 --- a/python-tox.changes +++ b/python-tox.changes @@ -6,6 +6,8 @@ Fri May 5 14:30:53 UTC 2023 - Matej Cepl to the packaged changelog. - Add mark-network-tests.patch to skip test which require network access +- Add optional_devpi_process.patch to make the package not depend + on devpi_process (which is rather expensive to build). ------------------------------------------------------------------- Fri Apr 21 12:37:47 UTC 2023 - Dirk Müller diff --git a/python-tox.spec b/python-tox.spec index a146422..a5d8c11 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -17,6 +17,11 @@ %{?sle15_python_module_pythons} +%if 0%{?sle15_python_module_pythons} +%bcond_without devpi_process +%else +%bcond_with devpi_process +%endif Name: python-tox Version: 4.5.1 Release: 0 @@ -56,6 +61,9 @@ BuildRequires: %{python_module toml >= 0.9.4} 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 @@ -108,7 +116,11 @@ use for: CI and shell-based testing. %prep -%autosetup -p1 -n tox-%{version} +%setup -q -n tox-%{version} +%if %{with devpi_process} +%patch0 -p1 +%endif +%autopatch -p1 -m 1 %build export LANG=en_US.UTF8 From d425c2befed4cd470f44d470ff3a487e51f1cf4e98d8ab4cffb442668ef22cff Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 11 May 2023 06:05:59 +0000 Subject: [PATCH 4/8] Correct use of sle15_python_module_pythons OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tox?expand=0&rev=99 --- python-tox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-tox.spec b/python-tox.spec index a5d8c11..ae4674e 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -17,7 +17,7 @@ %{?sle15_python_module_pythons} -%if 0%{?sle15_python_module_pythons} +%if %{defined sle15_python_module_pythons} %bcond_without devpi_process %else %bcond_with devpi_process From 6c1f7bb642d541c2155d06544c9fe98d0bfdf70cb3ab1dba251e87093b4ac3d6 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Thu, 11 May 2023 07:07:17 +0000 Subject: [PATCH 5/8] Temporarily switch off devpi-process OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tox?expand=0&rev=100 --- python-tox.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python-tox.spec b/python-tox.spec index ae4674e..b09ac59 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -17,11 +17,11 @@ %{?sle15_python_module_pythons} -%if %{defined sle15_python_module_pythons} -%bcond_without devpi_process -%else +# %%if %%{defined sle15_python_module_pythons} +# %%bcond_without devpi_process +# %%else %bcond_with devpi_process -%endif +# %%endif Name: python-tox Version: 4.5.1 Release: 0 From aa34e2856ab0ad52ebc1054ff04f63da0f8595579dde29258f49bc3c89092826 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 12 May 2023 13:19:49 +0000 Subject: [PATCH 6/8] Skip more tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tox?expand=0&rev=101 --- python-tox.spec | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/python-tox.spec b/python-tox.spec index b09ac59..eb8f497 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -17,11 +17,11 @@ %{?sle15_python_module_pythons} -# %%if %%{defined sle15_python_module_pythons} -# %%bcond_without devpi_process -# %%else +%if %{defined sle15_python_module_pythons} +%bcond_without devpi_process +%else %bcond_with devpi_process -# %%endif +%endif Name: python-tox Version: 4.5.1 Release: 0 @@ -61,7 +61,7 @@ BuildRequires: %{python_module toml >= 0.9.4} 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} +%if %{without devpi_process} BuildRequires: %{python_module devpi-process} %endif BuildRequires: fdupes @@ -117,7 +117,7 @@ use for: %prep %setup -q -n tox-%{version} -%if %{with devpi_process} +%if %{without devpi_process} %patch0 -p1 %endif %autopatch -p1 -m 1 @@ -147,6 +147,8 @@ 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" %{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} From 05f573255864f7f1c0fa8050421cbbf40fba07f55e4561e4893a0ebc15fa7ad0 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 12 May 2023 13:20:14 +0000 Subject: [PATCH 7/8] Fix typo OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tox?expand=0&rev=102 --- python-tox.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-tox.spec b/python-tox.spec index eb8f497..b92bfb7 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -61,7 +61,7 @@ BuildRequires: %{python_module toml >= 0.9.4} BuildRequires: %{python_module tomli >= 2.0.1} BuildRequires: %{python_module virtualenv >= 20.21.0} BuildRequires: %{python_module wheel >= 0.29.0} -%if %{without devpi_process} +%if %{with devpi_process} BuildRequires: %{python_module devpi-process} %endif BuildRequires: fdupes From c5d63e6ff697e112efa1b9c9b14e7f7981192e0b58d0d3c102960beba59cb4fe Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 12 May 2023 13:33:05 +0000 Subject: [PATCH 8/8] - Add _constraints. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tox?expand=0&rev=103 --- _constraints | 10 ++++++++++ python-tox.changes | 1 + 2 files changed, 11 insertions(+) create mode 100644 _constraints diff --git a/_constraints b/_constraints new file mode 100644 index 0000000..d0364c7 --- /dev/null +++ b/_constraints @@ -0,0 +1,10 @@ + + + + 10 + + + 24 + + + diff --git a/python-tox.changes b/python-tox.changes index 977ab73..30ac567 100644 --- a/python-tox.changes +++ b/python-tox.changes @@ -8,6 +8,7 @@ Fri May 5 14:30:53 UTC 2023 - Matej Cepl access - Add optional_devpi_process.patch to make the package not depend on devpi_process (which is rather expensive to build). +- Add _constraints. ------------------------------------------------------------------- Fri Apr 21 12:37:47 UTC 2023 - Dirk Müller