From 296d92ae46fc1ea6e006597283ddbd7101cdee21680f360462420b19d5b98254 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sun, 17 Jan 2021 23:13:24 +0000 Subject: [PATCH] Accepting request 863907 from home:bnavigator:branches:devel:languages:python - Update requirements - Fix the test suite failure introduced by the switch to coinstallable python3 flavors: must be called with plain python name for sys.executable to not detect the minor version as binary extension (python3.8 --> magic.8) - Update to v3.21.1 OBS-URL: https://build.opensuse.org/request/show/863907 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tox?expand=0&rev=80 --- python-tox.changes | 11 ++++++- python-tox.spec | 81 +++++++++++++++++++++++++++++----------------- 2 files changed, 61 insertions(+), 31 deletions(-) diff --git a/python-tox.changes b/python-tox.changes index f534753..ef5650f 100644 --- a/python-tox.changes +++ b/python-tox.changes @@ -1,9 +1,18 @@ +------------------------------------------------------------------- +Sun Jan 17 20:03:10 UTC 2021 - Benjamin Greiner + +- Update requirements +- Fix the test suite failure introduced by the switch to + coinstallable python3 flavors: must be called with plain python + name for sys.executable to not detect the minor version as + binary extension (python3.8 --> magic.8) + ------------------------------------------------------------------- Wed Jan 13 16:19:45 UTC 2021 - John Vandenberg - Remove build dependency on pytest-cov - Re-enable test_create_KeyboardInterrupt and spinner tests -- Update to v0.21.1 +- Update to v3.21.1 * Fix regression that broke using install_command in config replacements * Fix regression parsing posargs default containing colon diff --git a/python-tox.spec b/python-tox.spec index 192423b..013b7bb 100644 --- a/python-tox.spec +++ b/python-tox.spec @@ -26,42 +26,50 @@ 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 filelock >= 3.0.0} -BuildRequires: %{python_module flaky >= 3.4.0} -BuildRequires: %{python_module freezegun >= 0.3.11} -BuildRequires: %{python_module importlib-metadata >= 0.12} -BuildRequires: %{python_module pathlib2 >= 2.3.3} +BuildRequires: %{python_module packaging >= 14} BuildRequires: %{python_module pip} BuildRequires: %{python_module pluggy >= 0.12.0} BuildRequires: %{python_module py >= 1.4.17} -BuildRequires: %{python_module pytest >= 4.0.0} -BuildRequires: %{python_module pytest-mock >= 1.10.0} -BuildRequires: %{python_module pytest-xdist >= 1.22.2} 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} -BuildRequires: %{python_module virtualenv >= 16.0.0} +BuildRequires: %{python_module toml >= 0.9.4} +BuildRequires: %{python_module virtualenv >= 20.0.8} BuildRequires: %{python_module wheel >= 0.29.0} BuildRequires: fdupes -# we need python2 interpreter in tests for venv calls checks -# even on python3 variant -BuildRequires: python-base 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-filelock >= 3.0.0 -Requires: python-importlib-metadata >= 0.12 -Requires: python-packaging >= 17.1 +Requires: python-packaging >= 14 +Requires: python-pip Requires: python-pluggy >= 0.12.0 Requires: python-py >= 1.4.17 -Requires: python-setuptools >= 30.0.0 Requires: python-six >= 1.14.0 Requires: python-toml >= 0.9.4 -Requires: python-virtualenv >= 16.0.0 +Requires: python-virtualenv >= 20.0.8 +%if 0%{?python_version_nodots} < 38 +Requires: python-importlib-metadata >= 0.12 +%endif Requires(post): update-alternatives Requires(postun): update-alternatives -Obsoletes: python-detox +# last detox version is 0.19 +Obsoletes: python-detox <= 0.19 BuildArch: noarch -%ifpython3 +# 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 psutil >= 5.6.1} +BuildRequires: %{python_module pytest >= 4.0.0} +BuildRequires: %{python_module pytest-mock >= 1.10.0} +BuildRequires: %{python_module pytest-xdist >= 1.22.2} +%if %{with python2} +BuildRequires: python-pathlib2 >= 2.3.3 +%endif +# /SECTION +%if "%{python_flavor}" == "python3" || "%{?python_provides}" == "python3" Provides: tox = %{version} %endif %python_subpackages @@ -103,8 +111,6 @@ This is the HTML documentation for tox package. %prep %setup -q -n tox-%{version} -# remove cmdline test as they exec tox binary that is alternatived by us -rm -f tests/unit/test_z_cmdline.py %build export LANG=en_US.UTF8 @@ -113,18 +119,33 @@ export LANG=en_US.UTF8 %install export LANG=en_US.UTF8 %pyproject_install -for B in tox tox-quickstart ; do - %python_clone -a %{buildroot}%{_bindir}/$B -done +%python_clone -a %{buildroot}%{_bindir}/tox +%python_clone -a %{buildroot}%{_bindir}/tox-quickstart %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -export PYTHONDONTWRITEBYTECODE=1 -export PATH=%{buildroot}%{_bindir}:$PATH -# Ignores for gh#tox-dev/tox#1293 -# test_dist_exists_version_change test_verbose_isolated_build: need python2* deps even on python3 -# test_build_backend_without_submodule fails on Leap -%pytest -k 'not (network or parallel or test_provision_missing or test_provision_interrupt_child or test_workdir_gets_resolved or test_provision_cli_args_ignore or test_provision_non_canonical_dep or test_provision_from_pyvenv or test_verbose_isolated_build or test_dist_exists_version_change or test_build_backend_without_submodule)' +# 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. +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_parallel_live or (test_parallel and not test_parallel_)" +%if %{with python2} +# wants to install pathlib2 wheel on python2 +donttest+=" or test_build_backend_without_submodule" +%endif + +%{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 ./tox*.whl +python -B -m pytest -v -m "not network" -k "not (${donttest:4})" -n auto +deactivate +} %post %python_install_alternative tox tox-quickstart @@ -137,7 +158,7 @@ export PATH=%{buildroot}%{_bindir}:$PATH %doc README.md docs/changelog.rst CONTRIBUTORS CONTRIBUTING.rst %python_alternative %{_bindir}/tox %python_alternative %{_bindir}/tox-quickstart -%{python_sitelib}/tox-%{version}* +%{python_sitelib}/tox-%{version}*-info %{python_sitelib}/tox %changelog