diff --git a/srcpkgs/tox/patches/fix-testing.patch b/srcpkgs/tox/patches/fix-testing.patch new file mode 100644 index 00000000000..011d4d1dfef --- /dev/null +++ b/srcpkgs/tox/patches/fix-testing.patch @@ -0,0 +1,20 @@ +diff --git a/src/tox/pytest.py b/src/tox/pytest.py +index d7243bd8..c4d20e2d 100644 +--- a/src/tox/pytest.py ++++ b/src/tox/pytest.py +@@ -16,7 +16,6 @@ from typing import TYPE_CHECKING, Any, Callable, Iterator, Protocol, Sequence, c + + import pytest + from _pytest.fixtures import SubRequest +-from devpi_process import IndexServer + from virtualenv.info import fs_supports_symlink + + import tox.run +@@ -476,6 +475,7 @@ def enable_pypi_server(monkeypatch: pytest.MonkeyPatch, url: str | None) -> None + def pypi_server(tmp_path_factory: pytest.TempPathFactory) -> Iterator[IndexServer]: + # takes around 2.5s + path = tmp_path_factory.mktemp("pypi") ++ from devpi_process import IndexServer + with IndexServer(path) as server: + server.create_index("empty", "volatile=False") + yield server diff --git a/srcpkgs/tox/template b/srcpkgs/tox/template index 3aa24204294..232a63746d7 100644 --- a/srcpkgs/tox/template +++ b/srcpkgs/tox/template @@ -1,32 +1,30 @@ # Template file for 'tox' pkgname=tox -version=3.28.0 -revision=2 -build_style=python3-module -hostmakedepends="python3-setuptools_scm" -depends="python3-filelock python3-packaging - python3-pluggy python3-pytest python3-virtualenv" -checkdepends="${depends} python3-pip python3-pytest-mock - python3-flaky python3-pathlib2 python3-freezegun" +version=4.11.4 +revision=1 +build_style=python3-pep517 +hostmakedepends="hatchling hatch-vcs" +depends="python3-cachetools python3-chardet python3-colorama python3-filelock + python3-pyproject-api python3-virtualenv" +checkdepends="$depends python3-distlib python3-flaky python3-psutil + python3-pytest python3-pytest-mock python3-pytest-xdist python3-re-assert + python3-time-machine python3-wheel" short_desc="Generic virtualenv management and test command line tool" -maintainer="Orphaned " +maintainer="Gonzalo TornarĂ­a " license="MIT" -homepage="https://tox.wiki/en/legacy/" -changelog="https://tox.wiki/en/legacy/changelog.html" +homepage="https://tox.wiki/" +changelog="https://raw.githubusercontent.com/tox-dev/tox/main/docs/changelog.rst" distfiles="${PYPI_SITE}/t/tox/tox-${version}.tar.gz" -checksum=d0d28f3fe6d6d7195c27f8b054c3e99d5451952b54abdae673b71609a581f640 +checksum=73a7240778fabf305aeb05ab8ea26e575e042ab5a18d71d0ed13e343a51d6ce1 do_check() { - # Skipped tests fail to find module or rely on missing entrypoint script - PYTHONPATH=src python3 -m pytest \ - -k "not test_parallel \ - and not test_provision_race \ - and not test_tox_console_script \ - and not test_tox_quickstart_script \ - and not test_provision_cli_args_ignore \ - and not test_provision_interrupt_child \ - and not test_provision_non_canonical_dep \ - and not test_package_poetry" + # Running via PYTHONPATH breaks a few tests so we use a venv + local testdir="${wrksrc}/.xbps-testdir/$(date +%s)" + python3 -m venv --system-site-packages --without-pip "${testdir}" + + local testpy="${testdir}/bin/python3" + "${testpy}" -m installer dist/*.whl + PATH="${testdir}/bin:${PATH}" "${testpy}" -m pytest -n ${XBPS_MAKEJOBS} } post_install() { diff --git a/srcpkgs/tox/update b/srcpkgs/tox/update index e957dc43055..25ef51d109a 100644 --- a/srcpkgs/tox/update +++ b/srcpkgs/tox/update @@ -1 +1 @@ -ignore="*a* *b*" +ignore="*a* *b* *rc*"