From 35b51166586ee376f9af30e73aa03519558f0fb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 31 Dec 2023 17:47:02 -0300 Subject: [PATCH 1/4] New package: python3-pyproject-api-1.6.1 --- srcpkgs/python3-pyproject-api/template | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 srcpkgs/python3-pyproject-api/template diff --git a/srcpkgs/python3-pyproject-api/template b/srcpkgs/python3-pyproject-api/template new file mode 100644 index 0000000000000..aa2a8c74fe1e9 --- /dev/null +++ b/srcpkgs/python3-pyproject-api/template @@ -0,0 +1,24 @@ +# Template file for 'python3-pyproject-api' +pkgname=python3-pyproject-api +version=1.6.1 +revision=1 +build_style=python3-pep517 +hostmakedepends="hatchling hatch-vcs" +depends="python3-packaging" +checkdepends="python3-pytest python3-pytest-mock python3-wheel" +short_desc="API to interact with the python pyproject.toml based projects" +maintainer="Gonzalo Tornaría " +license="MIT" +homepage="https://github.com/tox-dev/pyproject-api" +changelog="https://raw.githubusercontent.com/tox-dev/pyproject-api/main/docs/changelog.rst" +distfiles="${PYPI_SITE}/p/pyproject-api/pyproject_api-${version}.tar.gz" +checksum=1817dc018adc0d1ff9ca1ed8c60e1623d5aaca40814b953af14a9cf9a5cae538 + +if [ "$XBPS_BUILD_ENVIRONMENT" = void-packages-ci ]; then + # this test fails on CI + make_check_args="--deselect tests/test_frontend_setuptools.py::test_result_missing" +fi + +post_install() { + vlicense LICENSE +} From 41ea920348c58614af906551938d4ed591aa1b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 31 Dec 2023 17:46:41 -0300 Subject: [PATCH 2/4] New package: python3-time-machine-2.13.0 --- srcpkgs/python3-time-machine/template | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 srcpkgs/python3-time-machine/template diff --git a/srcpkgs/python3-time-machine/template b/srcpkgs/python3-time-machine/template new file mode 100644 index 0000000000000..9754e5df92e11 --- /dev/null +++ b/srcpkgs/python3-time-machine/template @@ -0,0 +1,20 @@ +# Template file for 'python3-time-machine' +pkgname=python3-time-machine +version=2.13.0 +revision=1 +build_style=python3-pep517 +hostmakedepends="python3-setuptools python3-wheel" +makedepends="python3-devel" +depends="python3-dateutil" +checkdepends="$depends python3-pytest" +short_desc="Travel through time in your tests" +maintainer="Gonzalo Tornaría " +license="MIT" +homepage="https://github.com/adamchainz/time-machine" +changelog="https://raw.githubusercontent.com/adamchainz/time-machine/main/CHANGELOG.rst" +distfiles="https://github.com/adamchainz/time-machine/archive/refs/tags/${version}.tar.gz" +checksum=a0892ada963bd16fdaf657d71ef9bec614931c467a935f3217bf08906fe3bd11 + +post_install() { + vlicense LICENSE +} From 6f790a61c4d68a67e6773de05d0c61e2153208ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 31 Dec 2023 17:52:56 -0300 Subject: [PATCH 3/4] New package: python3-re-assert-1.1.0 --- srcpkgs/python3-re-assert/template | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 srcpkgs/python3-re-assert/template diff --git a/srcpkgs/python3-re-assert/template b/srcpkgs/python3-re-assert/template new file mode 100644 index 0000000000000..4e5a7aa78befa --- /dev/null +++ b/srcpkgs/python3-re-assert/template @@ -0,0 +1,18 @@ +# Template file for 'python3-re-assert' +pkgname=python3-re-assert +version=1.1.0 +revision=1 +build_style=python3-pep517 +hostmakedepends="python3-setuptools python3-wheel" +depends="python3-regex" +checkdepends="$depends python3-pytest" +short_desc="Show where your regex match assertion failed!" +maintainer="Gonzalo Tornaría " +license="MIT" +homepage="https://github.com/asottile/re-assert" +distfiles="https://github.com/asottile/re-assert/archive/refs/tags/v${version}.tar.gz" +checksum=01c4a849ed520923e4bab9afdf73b5f2698c4f92ad7f580ccb3f68ea79c69c0c + +post_install() { + vlicense LICENSE +} From f52cb8b7909f7ffc6313ea3141a60a562a2a738d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 31 Dec 2023 18:05:43 -0300 Subject: [PATCH 4/4] tox: update to 4.11.4, adopt. --- srcpkgs/tox/patches/fix-testing.patch | 20 +++++++++++++ srcpkgs/tox/template | 42 +++++++++++++-------------- srcpkgs/tox/update | 2 +- 3 files changed, 41 insertions(+), 23 deletions(-) create mode 100644 srcpkgs/tox/patches/fix-testing.patch diff --git a/srcpkgs/tox/patches/fix-testing.patch b/srcpkgs/tox/patches/fix-testing.patch new file mode 100644 index 0000000000000..011d4d1dfef55 --- /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 3aa2420429413..232a63746d758 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 e957dc43055f1..25ef51d109a4f 100644 --- a/srcpkgs/tox/update +++ b/srcpkgs/tox/update @@ -1 +1 @@ -ignore="*a* *b*" +ignore="*a* *b* *rc*"