From 64fea7e7b2340609946397bee117946b9ca41122 Mon Sep 17 00:00:00 2001 From: "Liguros - Gitlab CI/CD [develop]" Date: Sun, 23 Jun 2024 19:22:40 +0000 Subject: Adding metadata --- dev-python/cachelib/cachelib-0.13.0.ebuild | 4 +- dev-python/clang-python/Manifest | 1 + .../clang-python-19.0.0_pre20240623.ebuild | 53 ++++++ dev-python/commentjson/commentjson-0.9.0-r2.ebuild | 10 +- .../files/commentjson-0.9.0-py312.patch | 24 +++ dev-python/lit/Manifest | 1 + dev-python/lit/lit-19.0.0_pre20240623.ebuild | 45 +++++ dev-python/pip/files/pip-24.1-unbundle.patch | 193 ++++++++++++++++++++ dev-python/pip/pip-24.1-r1.ebuild | 176 +++++++++++++++++++ dev-python/resolvelib/resolvelib-1.0.1.ebuild | 2 +- .../setuptools-rust-1.9.0-r1.ebuild | 2 +- .../setuptools-rust/setuptools-rust-1.9.0.ebuild | 194 --------------------- dev-python/tenacity/tenacity-8.4.1.ebuild | 18 +- dev-python/wxpython/wxpython-4.2.1-r2.ebuild | 7 + 14 files changed, 529 insertions(+), 201 deletions(-) create mode 100644 dev-python/clang-python/clang-python-19.0.0_pre20240623.ebuild create mode 100644 dev-python/commentjson/files/commentjson-0.9.0-py312.patch create mode 100644 dev-python/lit/lit-19.0.0_pre20240623.ebuild create mode 100644 dev-python/pip/files/pip-24.1-unbundle.patch create mode 100644 dev-python/pip/pip-24.1-r1.ebuild delete mode 100644 dev-python/setuptools-rust/setuptools-rust-1.9.0.ebuild (limited to 'dev-python') diff --git a/dev-python/cachelib/cachelib-0.13.0.ebuild b/dev-python/cachelib/cachelib-0.13.0.ebuild index c3c45c4c5e45..97a476b48a6e 100644 --- a/dev-python/cachelib/cachelib-0.13.0.ebuild +++ b/dev-python/cachelib/cachelib-0.13.0.ebuild @@ -25,11 +25,13 @@ KEYWORDS="amd64 ~arm arm64 x86" BDEPEND=" test? ( dev-db/redis - dev-python/pylibmc[${PYTHON_USEDEP}] dev-python/pytest-xprocess[${PYTHON_USEDEP}] dev-python/redis[${PYTHON_USEDEP}] net-misc/memcached www-servers/uwsgi[python,${PYTHON_USEDEP}] + !sparc? ( + dev-python/pylibmc[${PYTHON_USEDEP}] + ) ) " diff --git a/dev-python/clang-python/Manifest b/dev-python/clang-python/Manifest index 0a3ba6606f4d..fed5022f64a4 100644 --- a/dev-python/clang-python/Manifest +++ b/dev-python/clang-python/Manifest @@ -6,5 +6,6 @@ DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e06541 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 DIST llvm-project-18.1.7.src.tar.xz 132063384 BLAKE2B b8c37bd131fb5f3131bfab4fbad7aa811079ca10723faa14779253bc62b1ee08d4e04650e1da883297ed88a62d518b868a1f13cf57d03233254fd01209da5c02 SHA512 0f67818267803aca9d2bc9eb89335ee6dc56269e8066a0f8a48c4a959e8805dbf6bc839b9f96a92f86ee50d72e7cc326ffe18febb5eb06751ab54a217c0221c8 DIST llvm-project-18.1.7.src.tar.xz.sig 566 BLAKE2B 9ae6d80eba5309ce3d5cba580df57c28dbcf429266b2ced622465e34ab2a7ae0f100d1e89c73a44abccd95a3367979344450fd53fb6a2baa029b929d3f13eee3 SHA512 7e5601e35f4fcaa4ed042638ae5a4fb90714c9dce58aa3f98e965568660b88294185621a4eb5547de262dca8a96f620db3f94932bb1776661e345dbe1266315c +DIST llvm-project-3ae6755719c6dfc07761b4e9bdac8c86bcb41734.tar.gz 213487323 BLAKE2B 12030750fca0e7db4ae07a608874877151b2393cf58388f067b469e913ce9ac3f264440ebb3df5ea33f9f97cb87928fa746c98ba26c8d296f9e26dcbf950afc2 SHA512 951b70eafc8aea5b1f7847002229d89df565ca8180deef08b25966dcf070a7603a258e5fc24f9496251d23d275040724ed5e9499432ba3e19f5984f6f1c3c645 DIST llvm-project-5aabbf0602c48b67bb89fd37f95bf97c95ded488.tar.gz 212582616 BLAKE2B 78522148bb4993bd26b16f1e3f44c2baf617705667c7fb104edc844c4330017166c783adae2f0215ca7463c05d1eef30fdf02b13241a9497aaede36bb8580a26 SHA512 104e0b5b4f34102f2da03cd54fe9bf5f7fb6efb3a9745d8ec85caa5f92189fde4a5c02c327243d87ff5c7d24b3790fcabdf0ef7144e79e15765785ca72dd3841 DIST llvm-project-cddb9ce04e68d876de895d39d60b6af34d569012.tar.gz 213219536 BLAKE2B 5aba2c1dd19d73a8691590873f1697fa32adeab7f84d1d5636e211071e64bfa5d28a49ea9cfdba5fbae77c9520c2103a9f1544d669c7948a318636557f45f6ee SHA512 69ed25a0565c61cd4eb512e95b0fd2d2a3a09dbad73e7186d7fb1764193b06e522572eafb271d21469a4bfb133a62efe65e5ccd20cf05af8b43c52e195d477a9 diff --git a/dev-python/clang-python/clang-python-19.0.0_pre20240623.ebuild b/dev-python/clang-python/clang-python-19.0.0_pre20240623.ebuild new file mode 100644 index 000000000000..82c18f7c0f95 --- /dev/null +++ b/dev-python/clang-python/clang-python-19.0.0_pre20240623.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8,9,10,11,12} ) +inherit llvm.org python-r1 + +DESCRIPTION="Python bindings for sys-devel/clang" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# The module is opening libclang.so directly, and doing some blasphemy +# on top of it. +DEPEND=" + >=sys-devel/clang-${PV}:* + !sys-devel/llvm:0[clang(-),python(-)] + !sys-devel/clang:0[python(-)] +" +RDEPEND=" + ${DEPEND} + ${PYTHON_DEPS} +" +BDEPEND=" + ${PYTHON_DEPS} + test? ( + sys-devel/clang:${LLVM_MAJOR} + ) +" + +LLVM_COMPONENTS=( clang/bindings/python ) +llvm.org_set_globals + +python_test() { + # tests rely on results from a specific clang version, so override + # the search path + local -x CLANG_LIBRARY_PATH=${BROOT}/usr/lib/llvm/${LLVM_MAJOR}/$(get_libdir) + local -x CLANG_NO_DEFAULT_CONFIG=1 + "${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}" +} + +src_test() { + python_foreach_impl python_test +} + +src_install() { + python_foreach_impl python_domodule clang +} diff --git a/dev-python/commentjson/commentjson-0.9.0-r2.ebuild b/dev-python/commentjson/commentjson-0.9.0-r2.ebuild index d656940d7234..f51de2dd1738 100644 --- a/dev-python/commentjson/commentjson-0.9.0-r2.ebuild +++ b/dev-python/commentjson/commentjson-0.9.0-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 2021-2023 Gentoo Authors +# Copyright 2021-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -34,7 +34,13 @@ BDEPEND=" distutils_enable_tests unittest src_prepare() { + local PATCHES=( + # https://github.com/vaidik/commentjson/pull/54 + "${FILESDIR}/${P}-py312.patch" + ) + + distutils-r1_src_prepare + # remove lark-parser dependency to allow painless upgrade to lark sed -e '/lark-parser/d' -i setup.py || die - distutils-r1_src_prepare } diff --git a/dev-python/commentjson/files/commentjson-0.9.0-py312.patch b/dev-python/commentjson/files/commentjson-0.9.0-py312.patch new file mode 100644 index 000000000000..dbdcfe488f83 --- /dev/null +++ b/dev-python/commentjson/files/commentjson-0.9.0-py312.patch @@ -0,0 +1,24 @@ +From 04ad293f800039c0221ff010236e589a4ba7079d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Sun, 23 Jun 2024 14:54:42 +0200 +Subject: [PATCH] Update test skips for Python 3.12+ + +Python 3.12 moves testing for `Infinity` and other constants +into `test_json/test_decode.py::test_parse_constant`. +--- + commentjson/tests/test_json/test_decode.py | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/commentjson/tests/test_json/test_decode.py b/commentjson/tests/test_json/test_decode.py +index 6971c44..8f5e904 100644 +--- a/commentjson/tests/test_json/test_decode.py ++++ b/commentjson/tests/test_json/test_decode.py +@@ -69,3 +69,8 @@ def test_string_with_utf8_bom(self): + 'test case is not supported by commentjson.')) + def test_negative_index(self): + pass ++ ++ @unittest.skipIf(version >= (3, 12), ++ 'Infinity as a value is not supported yet') ++ def test_parse_constant(self): ++ pass diff --git a/dev-python/lit/Manifest b/dev-python/lit/Manifest index 0a3ba6606f4d..fed5022f64a4 100644 --- a/dev-python/lit/Manifest +++ b/dev-python/lit/Manifest @@ -6,5 +6,6 @@ DIST llvm-project-17.0.6.src.tar.xz 127838860 BLAKE2B d6ede1a9fda8756995c3e06541 DIST llvm-project-17.0.6.src.tar.xz.sig 438 BLAKE2B 186e75b6a0fbfe1e85408589c149e1800fcc47d685b74e4260018e05cd08bc793d1d1197c9c50e177eea941a3d0c65cb0c583ce6dae449099b920adf8a508ef7 SHA512 f78c55053a6450625f3e95f52c305110b4468a9854fec75831b65b8d6ceee3c9206ab9e63c4b5fda8be9bd344f72cfbdaae0520ed240abd505e08ebeaa25d340 DIST llvm-project-18.1.7.src.tar.xz 132063384 BLAKE2B b8c37bd131fb5f3131bfab4fbad7aa811079ca10723faa14779253bc62b1ee08d4e04650e1da883297ed88a62d518b868a1f13cf57d03233254fd01209da5c02 SHA512 0f67818267803aca9d2bc9eb89335ee6dc56269e8066a0f8a48c4a959e8805dbf6bc839b9f96a92f86ee50d72e7cc326ffe18febb5eb06751ab54a217c0221c8 DIST llvm-project-18.1.7.src.tar.xz.sig 566 BLAKE2B 9ae6d80eba5309ce3d5cba580df57c28dbcf429266b2ced622465e34ab2a7ae0f100d1e89c73a44abccd95a3367979344450fd53fb6a2baa029b929d3f13eee3 SHA512 7e5601e35f4fcaa4ed042638ae5a4fb90714c9dce58aa3f98e965568660b88294185621a4eb5547de262dca8a96f620db3f94932bb1776661e345dbe1266315c +DIST llvm-project-3ae6755719c6dfc07761b4e9bdac8c86bcb41734.tar.gz 213487323 BLAKE2B 12030750fca0e7db4ae07a608874877151b2393cf58388f067b469e913ce9ac3f264440ebb3df5ea33f9f97cb87928fa746c98ba26c8d296f9e26dcbf950afc2 SHA512 951b70eafc8aea5b1f7847002229d89df565ca8180deef08b25966dcf070a7603a258e5fc24f9496251d23d275040724ed5e9499432ba3e19f5984f6f1c3c645 DIST llvm-project-5aabbf0602c48b67bb89fd37f95bf97c95ded488.tar.gz 212582616 BLAKE2B 78522148bb4993bd26b16f1e3f44c2baf617705667c7fb104edc844c4330017166c783adae2f0215ca7463c05d1eef30fdf02b13241a9497aaede36bb8580a26 SHA512 104e0b5b4f34102f2da03cd54fe9bf5f7fb6efb3a9745d8ec85caa5f92189fde4a5c02c327243d87ff5c7d24b3790fcabdf0ef7144e79e15765785ca72dd3841 DIST llvm-project-cddb9ce04e68d876de895d39d60b6af34d569012.tar.gz 213219536 BLAKE2B 5aba2c1dd19d73a8691590873f1697fa32adeab7f84d1d5636e211071e64bfa5d28a49ea9cfdba5fbae77c9520c2103a9f1544d669c7948a318636557f45f6ee SHA512 69ed25a0565c61cd4eb512e95b0fd2d2a3a09dbad73e7186d7fb1764193b06e522572eafb271d21469a4bfb133a62efe65e5ccd20cf05af8b43c52e195d477a9 diff --git a/dev-python/lit/lit-19.0.0_pre20240623.ebuild b/dev-python/lit/lit-19.0.0_pre20240623.ebuild new file mode 100644 index 000000000000..5ed5b5bd096e --- /dev/null +++ b/dev-python/lit/lit-19.0.0_pre20240623.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8,9,10,11,12} ) + +inherit distutils-r1 llvm.org + +DESCRIPTION="A stand-alone install of the LLVM suite testing tool" +HOMEPAGE="https://llvm.org/" + +LICENSE="Apache-2.0-with-LLVM-exceptions UoI-NCSA" +SLOT="0" +IUSE="test" +RESTRICT="!test? ( test )" + +# Tests require 'FileCheck' and 'not' utilities (from llvm) +BDEPEND=" + test? ( + dev-python/psutil[${PYTHON_USEDEP}] + sys-devel/llvm + ) +" + +LLVM_COMPONENTS=( llvm/utils/lit ) +llvm.org_set_globals + +# TODO: move the manpage generation here (from sys-devel/llvm) + +src_prepare() { + # flaky test + # https://github.com/llvm/llvm-project/issues/72022 + rm tests/progress-bar.py || die + + cd "${WORKDIR}" || die + distutils-r1_src_prepare +} + +python_test() { + local -x LIT_PRESERVES_TMP=1 + local litflags=$(get_lit_flags) + ./lit.py ${litflags//;/ } tests || die +} diff --git a/dev-python/pip/files/pip-24.1-unbundle.patch b/dev-python/pip/files/pip-24.1-unbundle.patch new file mode 100644 index 000000000000..676ffa36094b --- /dev/null +++ b/dev-python/pip/files/pip-24.1-unbundle.patch @@ -0,0 +1,193 @@ +diff --git a/src/pip/_internal/commands/debug.py b/src/pip/_internal/commands/debug.py +index 567ca967e..427bfcf04 100644 +--- a/src/pip/_internal/commands/debug.py ++++ b/src/pip/_internal/commands/debug.py +@@ -6,7 +6,6 @@ from optparse import Values + from types import ModuleType + from typing import Any, Dict, List, Optional + +-import pip._vendor + from pip._vendor.certifi import where + from pip._vendor.packaging.version import parse as parse_version + +@@ -192,9 +191,7 @@ class DebugCommand(Command): + show_value("REQUESTS_CA_BUNDLE", os.environ.get("REQUESTS_CA_BUNDLE")) + show_value("CURL_CA_BUNDLE", os.environ.get("CURL_CA_BUNDLE")) + show_value("pip._vendor.certifi.where()", where()) +- show_value("pip._vendor.DEBUNDLED", pip._vendor.DEBUNDLED) +- +- show_vendor_versions() ++ show_value("pip._vendor.DEBUNDLED", True) + + show_tags(options) + +diff --git a/tests/conftest.py b/tests/conftest.py +index 35101cef2..840663fed 100644 +--- a/tests/conftest.py ++++ b/tests/conftest.py +@@ -413,6 +413,7 @@ def _common_wheel_editable_install( + assert len(wheel_candidates) == 1, wheel_candidates + install_dir = tmpdir_factory.mktemp(package) / "install" + lib_install_dir = install_dir / "lib" ++ return lib_install_dir + bin_install_dir = install_dir / "bin" + with WheelFile.open(wheel_candidates[0]) as source: + install( +diff --git a/tests/functional/test_check.py b/tests/functional/test_check.py +index 46ecdcc64..6507febfa 100644 +--- a/tests/functional/test_check.py ++++ b/tests/functional/test_check.py +@@ -6,10 +6,8 @@ from tests.lib import PipTestEnvironment, create_test_package_with_setup + def matches_expected_lines(string: str, expected_lines: Collection[str]) -> bool: + # Ignore empty lines + output_lines = list(filter(None, string.splitlines())) +- # We'll match the last n lines, given n lines to match. +- last_few_output_lines = output_lines[-len(expected_lines) :] + # And order does not matter +- return set(last_few_output_lines) == set(expected_lines) ++ return set(expected_lines).issubset(set(output_lines)) + + + def test_basic_check_clean(script: PipTestEnvironment) -> None: +diff --git a/tests/functional/test_freeze.py b/tests/functional/test_freeze.py +index b7af974ea..144f79483 100644 +--- a/tests/functional/test_freeze.py ++++ b/tests/functional/test_freeze.py +@@ -80,8 +80,8 @@ def test_basic_freeze(script: PipTestEnvironment) -> None: + result = script.pip("freeze", expect_stderr=True) + expected = textwrap.dedent( + """\ +- ...simple==2.0 +- simple2==3.0... ++ ...simple==2.0... ++ ...simple2==3.0... + """ + ) + _check_output(result.stdout, expected) +@@ -1014,7 +1014,7 @@ def test_freeze_skip_work_dir_pkg(script: PipTestEnvironment) -> None: + + # Freeze should not include package simple when run from package directory + result = script.pip("freeze", cwd=pkg_path) +- assert "simple" not in result.stdout ++ assert "\nsimple==" not in result.stdout + + + def test_freeze_include_work_dir_pkg(script: PipTestEnvironment) -> None: +diff --git a/tests/functional/test_install_check.py b/tests/functional/test_install_check.py +index 8a8a7c93a..bbda083f7 100644 +--- a/tests/functional/test_install_check.py ++++ b/tests/functional/test_install_check.py +@@ -57,6 +57,7 @@ def test_check_install_canonicalization(script: PipTestEnvironment) -> None: + ) + assert "requires" not in result.stderr + assert result.returncode == 0 ++ return + + # Double check that all errors are resolved in the end + result = script.pip("check") +diff --git a/tests/functional/test_list.py b/tests/functional/test_list.py +index 5164c1d5c..ce0a81aea 100644 +--- a/tests/functional/test_list.py ++++ b/tests/functional/test_list.py +@@ -1,5 +1,6 @@ + import json + import os ++import re + from pathlib import Path + + import pytest +@@ -41,8 +42,8 @@ def test_basic_list(simple_script: PipTestEnvironment) -> None: + + """ + result = simple_script.pip("list") +- assert "simple 1.0" in result.stdout, str(result) +- assert "simple2 3.0" in result.stdout, str(result) ++ assert re.search(r"simple\s+1\.0", result.stdout), str(result) ++ assert re.search(r"simple2\s+3\.0", result.stdout), str(result) + + + def test_verbose_flag(simple_script: PipTestEnvironment) -> None: +@@ -54,8 +55,8 @@ def test_verbose_flag(simple_script: PipTestEnvironment) -> None: + assert "Version" in result.stdout, str(result) + assert "Location" in result.stdout, str(result) + assert "Installer" in result.stdout, str(result) +- assert "simple 1.0" in result.stdout, str(result) +- assert "simple2 3.0" in result.stdout, str(result) ++ assert re.search(r"simple\s+1\.0", result.stdout), str(result) ++ assert re.search(r"simple2\s+3\.0", result.stdout), str(result) + + + def test_columns_flag(simple_script: PipTestEnvironment) -> None: +@@ -66,8 +67,8 @@ def test_columns_flag(simple_script: PipTestEnvironment) -> None: + assert "Package" in result.stdout, str(result) + assert "Version" in result.stdout, str(result) + assert "simple (1.0)" not in result.stdout, str(result) +- assert "simple 1.0" in result.stdout, str(result) +- assert "simple2 3.0" in result.stdout, str(result) ++ assert re.search(r"simple\s+1\.0", result.stdout), str(result) ++ assert re.search(r"simple2\s+3\.0", result.stdout), str(result) + + + def test_format_priority(simple_script: PipTestEnvironment) -> None: +@@ -79,16 +80,16 @@ def test_format_priority(simple_script: PipTestEnvironment) -> None: + ) + assert "simple==1.0" in result.stdout, str(result) + assert "simple2==3.0" in result.stdout, str(result) +- assert "simple 1.0" not in result.stdout, str(result) +- assert "simple2 3.0" not in result.stdout, str(result) ++ assert not re.search(r"simple\s+1\.0", result.stdout), str(result) ++ assert not re.search(r"simple2\s+3\.0", result.stdout), str(result) + + result = simple_script.pip("list", "--format=freeze", "--format=columns") + assert "Package" in result.stdout, str(result) + assert "Version" in result.stdout, str(result) + assert "simple==1.0" not in result.stdout, str(result) + assert "simple2==3.0" not in result.stdout, str(result) +- assert "simple 1.0" in result.stdout, str(result) +- assert "simple2 3.0" in result.stdout, str(result) ++ assert re.search(r"simple\s+1\.0", result.stdout), str(result) ++ assert re.search(r"simple2\s+3\.0", result.stdout), str(result) + + + def test_local_flag(simple_script: PipTestEnvironment) -> None: +@@ -124,8 +125,8 @@ def test_multiple_exclude_and_normalization( + assert "Normalizable_Name" in result.stdout + assert "pip" in result.stdout + result = script.pip("list", "--exclude", "normalizablE-namE", "--exclude", "pIp") +- assert "Normalizable_Name" not in result.stdout +- assert "pip" not in result.stdout ++ assert "Normalizable_Name " not in result.stdout ++ assert "pip " not in result.stdout + + + @pytest.mark.network +diff --git a/tests/lib/venv.py b/tests/lib/venv.py +index fac54d3bd..6bfe3cfdc 100644 +--- a/tests/lib/venv.py ++++ b/tests/lib/venv.py +@@ -9,6 +9,7 @@ import venv as _venv + from pathlib import Path + from typing import Dict, Literal, Optional, Union + ++import pytest + import virtualenv as _virtualenv + + VirtualEnvironmentType = Literal["virtualenv", "venv"] +@@ -35,7 +36,7 @@ class VirtualEnvironment: + self._venv_type = venv_type + else: + self._venv_type = "virtualenv" +- self._user_site_packages = False ++ self._user_site_packages = True + self._template = template + self._sitecustomize: Optional[str] = None + self._update_paths() +@@ -234,6 +235,8 @@ class VirtualEnvironment: + + @user_site_packages.setter + def user_site_packages(self, value: bool) -> None: ++ if not value: ++ pytest.skip("Gentoo: skipping due to lack of system site-packages") + self._user_site_packages = value + if self._legacy_virtualenv: + marker = self.lib / "no-global-site-packages.txt" diff --git a/dev-python/pip/pip-24.1-r1.ebuild b/dev-python/pip/pip-24.1-r1.ebuild new file mode 100644 index 000000000000..afc109099863 --- /dev/null +++ b/dev-python/pip/pip-24.1-r1.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# please bump dev-python/ensurepip-pip along with this package! + +DISTUTILS_USE_PEP517=setuptools +PYTHON_TESTED=( python3_{8,9,10,11,12} ) +PYTHON_COMPAT=( python3_{8,9,10,11,12} pypy3 ) +PYTHON_REQ_USE="ssl(+),threads(+)" + +inherit bash-completion-r1 distutils-r1 + +DESCRIPTION="The PyPA recommended tool for installing Python packages" +HOMEPAGE=" + https://pip.pypa.io/en/stable/ + https://pypi.org/project/pip/ + https://github.com/pypa/pip/ +" +SRC_URI=" + https://github.com/pypa/pip/archive/${PV}.tar.gz -> ${P}.gh.tar.gz +" + +LICENSE="MIT" +# bundled deps +LICENSE+=" Apache-2.0 BSD BSD-2 ISC LGPL-2.1+ MPL-2.0 PSF-2" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +IUSE="test-rust" + +# see src/pip/_vendor/vendor.txt +RDEPEND=" + >=dev-python/cachecontrol-0.14.0[${PYTHON_USEDEP}] + >=dev-python/distlib-0.3.8[${PYTHON_USEDEP}] + >=dev-python/distro-1.9.0[${PYTHON_USEDEP}] + >=dev-python/msgpack-1.0.8[${PYTHON_USEDEP}] + >=dev-python/packaging-24.1[${PYTHON_USEDEP}] + >=dev-python/platformdirs-4.2.1[${PYTHON_USEDEP}] + >=dev-python/pyproject-hooks-1.0.0[${PYTHON_USEDEP}] + >=dev-python/requests-2.32.0[${PYTHON_USEDEP}] + >=dev-python/rich-13.7.1[${PYTHON_USEDEP}] + >=dev-python/resolvelib-1.0.1[${PYTHON_USEDEP}] + >=dev-python/setuptools-69.5.1[${PYTHON_USEDEP}] + >=dev-python/tenacity-8.2.3[${PYTHON_USEDEP}] + >=dev-python/tomli-2.0.1[${PYTHON_USEDEP}] + >=dev-python/truststore-0.9.1[${PYTHON_USEDEP}] + + >=dev-python/setuptools-39.2.0[${PYTHON_USEDEP}] +" +BDEPEND=" + ${RDEPEND} + test? ( + $(python_gen_cond_dep ' + dev-python/ensurepip-setuptools + dev-python/ensurepip-wheel + dev-python/freezegun[${PYTHON_USEDEP}] + dev-python/pretend[${PYTHON_USEDEP}] + dev-python/pytest-xdist[${PYTHON_USEDEP}] + dev-python/scripttest[${PYTHON_USEDEP}] + dev-python/tomli-w[${PYTHON_USEDEP}] + dev-python/virtualenv[${PYTHON_USEDEP}] + dev-python/werkzeug[${PYTHON_USEDEP}] + dev-python/wheel[${PYTHON_USEDEP}] + test-rust? ( + dev-python/cryptography[${PYTHON_USEDEP}] + ) + dev-vcs/git + ' "${PYTHON_TESTED[@]}") + ) +" + +distutils_enable_tests pytest + +python_prepare_all() { + local PATCHES=( + "${FILESDIR}/pip-23.1-no-coverage.patch" + # https://github.com/pypa/pip/issues/12786 (and more) + "${FILESDIR}/pip-24.1-test-offline.patch" + # prepare to unbundle dependencies + "${FILESDIR}/pip-24.1-unbundle.patch" + ) + + distutils-r1_python_prepare_all + + # unbundle dependencies + rm -r src/pip/_vendor || die + find -name '*.py' -exec sed -i \ + -e 's:from pip\._vendor import:import:g' \ + -e 's:from pip\._vendor\.:from :g' \ + {} + || die + + if use test; then + local wheels=( + "${BROOT}"/usr/lib/python/ensurepip/{setuptools,wheel}-*.whl + ) + mkdir tests/data/common_wheels/ || die + cp "${wheels[@]}" tests/data/common_wheels/ || die + fi +} + +python_compile_all() { + # 'pip completion' command embeds full $0 into completion script, which confuses + # 'complete' and causes QA warning when running as "${PYTHON} -m pip". + # This trick sets correct $0 while still calling just installed pip. + local pipcmd='import sys; sys.argv[0] = "pip"; __file__ = ""; from pip._internal.cli.main import main; sys.exit(main())' + "${EPYTHON}" -c "${pipcmd}" completion --bash > completion.bash || die + "${EPYTHON}" -c "${pipcmd}" completion --zsh > completion.zsh || die +} + +python_test() { + if ! has "${EPYTHON}" "${PYTHON_TESTED[@]/_/.}"; then + einfo "Skipping tests on ${EPYTHON}" + return 0 + fi + + local EPYTEST_DESELECT=( + tests/functional/test_inspect.py::test_inspect_basic + # Internet + tests/functional/test_config_settings.py::test_backend_sees_config_via_sdist + tests/functional/test_install.py::test_double_install_fail + tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed + # broken by system site-packages use + tests/functional/test_check.py::test_basic_check_clean + tests/functional/test_check.py::test_check_skip_work_dir_pkg + tests/functional/test_check.py::test_check_complicated_name_clean + tests/functional/test_check.py::test_check_development_versions_are_also_considered + tests/functional/test_freeze.py::test_freeze_with_setuptools + tests/functional/test_pip_runner_script.py::test_runner_work_in_environments_with_no_pip + tests/functional/test_uninstall.py::test_basic_uninstall_distutils + tests/unit/test_base_command.py::test_base_command_global_tempdir_cleanup + tests/unit/test_base_command.py::test_base_command_local_tempdir_cleanup + tests/unit/test_base_command.py::test_base_command_provides_tempdir_helpers + # broken by unbundling + "tests/functional/test_debug.py::test_debug[vendored library versions:]" + tests/functional/test_debug.py::test_debug__library_versions + tests/functional/test_python_option.py::test_python_interpreter + tests/functional/test_uninstall.py::test_uninstall_non_local_distutils + ) + local EPYTEST_IGNORE=( + # requires proxy.py + tests/functional/test_proxy.py + ) + + if ! has_version "dev-python/cryptography[${PYTHON_USEDEP}]"; then + EPYTEST_DESELECT+=( + tests/functional/test_install.py::test_install_sends_client_cert + tests/functional/test_install_config.py::test_do_not_prompt_for_authentication + tests/functional/test_install_config.py::test_prompt_for_authentication + tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed + ) + fi + + case ${EPYTHON} in + python3.10) + EPYTEST_DESELECT+=( + # no clue why they fail + ) + ;; + esac + + local -x PIP_DISABLE_PIP_VERSION_CHECK=1 + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + local EPYTEST_XDIST=1 + epytest -m "not network" -o tmp_path_retention_policy=all +} + +python_install_all() { + local DOCS=( AUTHORS.txt docs/html/**/*.rst ) + distutils-r1_python_install_all + + newbashcomp completion.bash pip + + insinto /usr/share/zsh/site-functions + newins completion.zsh _pip +} diff --git a/dev-python/resolvelib/resolvelib-1.0.1.ebuild b/dev-python/resolvelib/resolvelib-1.0.1.ebuild index 85fddd419742..9e08a30dd519 100644 --- a/dev-python/resolvelib/resolvelib-1.0.1.ebuild +++ b/dev-python/resolvelib/resolvelib-1.0.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 2021-2023 Gentoo Authors +# Copyright 2021-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 diff --git a/dev-python/setuptools-rust/setuptools-rust-1.9.0-r1.ebuild b/dev-python/setuptools-rust/setuptools-rust-1.9.0-r1.ebuild index d4345fea43d4..00f29c031344 100644 --- a/dev-python/setuptools-rust/setuptools-rust-1.9.0-r1.ebuild +++ b/dev-python/setuptools-rust/setuptools-rust-1.9.0-r1.ebuild @@ -134,7 +134,7 @@ SRC_URI=" # crates are used at test time only, update via pycargoebuild -L -i ... LICENSE="MIT" SLOT="0" -KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" +KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" IUSE="test" RESTRICT="!test? ( test )" diff --git a/dev-python/setuptools-rust/setuptools-rust-1.9.0.ebuild b/dev-python/setuptools-rust/setuptools-rust-1.9.0.ebuild deleted file mode 100644 index b4edbee38d25..000000000000 --- a/dev-python/setuptools-rust/setuptools-rust-1.9.0.ebuild +++ /dev/null @@ -1,194 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CARGO_OPTIONAL=yes -DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{8,9,10,11,12} pypy3 ) - -CRATES=" - autocfg@1.1.0 - bitflags@1.3.2 - byteorder@1.4.3 - cfg-if@1.0.0 - convert_case@0.4.0 - cssparser-macros@0.6.0 - cssparser@0.27.2 - derive_more@0.99.17 - dtoa-short@0.3.3 - dtoa@0.4.8 - futf@0.1.5 - fxhash@0.2.1 - getrandom@0.1.16 - heck@0.4.1 - html5ever@0.25.1 - indoc@2.0.4 - instant@0.1.12 - itoa@0.4.8 - kuchiki@0.8.1 - lazy_static@1.4.0 - libc@0.2.121 - libc@0.2.147 - lock_api@0.4.10 - lock_api@0.4.6 - log@0.4.14 - mac@0.1.1 - markup5ever@0.10.1 - matches@0.1.9 - memoffset@0.9.0 - new_debug_unreachable@1.0.4 - nodrop@0.1.14 - once_cell@1.10.0 - once_cell@1.18.0 - parking_lot@0.11.2 - parking_lot@0.12.1 - parking_lot_core@0.8.5 - parking_lot_core@0.9.8 - phf@0.8.0 - phf_codegen@0.8.0 - phf_generator@0.8.0 - phf_macros@0.8.0 - phf_shared@0.10.0 - phf_shared@0.8.0 - portable-atomic@1.6.0 - ppv-lite86@0.2.16 - precomputed-hash@0.1.1 - proc-macro-hack@0.5.19 - proc-macro2@1.0.66 - proc-macro2@1.0.69 - pyo3-build-config@0.20.3 - pyo3-ffi@0.20.3 - pyo3-macros-backend@0.20.3 - pyo3-macros@0.20.3 - pyo3@0.20.3 - quote@1.0.32 - quote@1.0.33 - rand@0.7.3 - rand_chacha@0.2.2 - rand_core@0.5.1 - rand_hc@0.2.0 - rand_pcg@0.2.1 - redox_syscall@0.2.11 - redox_syscall@0.3.5 - rustc_version@0.4.0 - scopeguard@1.1.0 - scopeguard@1.2.0 - selectors@0.22.0 - semver@1.0.6 - serde@1.0.136 - servo_arc@0.1.1 - siphasher@0.3.10 - smallvec@1.11.0 - smallvec@1.8.0 - stable_deref_trait@1.2.0 - string_cache@0.8.3 - string_cache_codegen@0.5.1 - syn@1.0.89 - syn@2.0.32 - syn@2.0.38 - target-lexicon@0.12.11 - target-lexicon@0.12.3 - tendril@0.4.3 - thin-slice@0.1.1 - unicode-ident@1.0.11 - unicode-ident@1.0.12 - unicode-xid@0.2.2 - unindent@0.2.3 - utf-8@0.7.6 - wasi@0.9.0+wasi-snapshot-preview1 - winapi-i686-pc-windows-gnu@0.4.0 - winapi-x86_64-pc-windows-gnu@0.4.0 - winapi@0.3.9 - windows-targets@0.48.1 - windows-targets@0.48.5 - windows_aarch64_gnullvm@0.48.0 - windows_aarch64_gnullvm@0.48.5 - windows_aarch64_msvc@0.48.0 - windows_aarch64_msvc@0.48.5 - windows_i686_gnu@0.48.0 - windows_i686_gnu@0.48.5 - windows_i686_msvc@0.48.0 - windows_i686_msvc@0.48.5 - windows_x86_64_gnu@0.48.0 - windows_x86_64_gnu@0.48.5 - windows_x86_64_gnullvm@0.48.0 - windows_x86_64_gnullvm@0.48.5 - windows_x86_64_msvc@0.48.0 - windows_x86_64_msvc@0.48.5 -" - -inherit distutils-r1 cargo - -DESCRIPTION="A plugin for setuptools to build Rust Python extensions" -HOMEPAGE=" - https://github.com/PyO3/setuptools-rust/ - https://pypi.org/project/setuptools-rust/ -" -SRC_URI=" - https://github.com/PyO3/setuptools-rust/archive/v${PV}.tar.gz - -> ${P}.gh.tar.gz - test? ( ${CARGO_CRATE_URIS} ) -" - -# crates are used at test time only, update via pycargoebuild -L -i ... -LICENSE="MIT" -SLOT="0" -KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="test" -RESTRICT="!test? ( test )" - -RDEPEND=" - virtual/rust - =dev-python/semantic-version-2.8.2[${PYTHON_USEDEP}] - >=dev-python/setuptools-62.4[${PYTHON_USEDEP}] -" -BDEPEND=" - >=dev-python/setuptools-62.4[${PYTHON_USEDEP}] - test? ( - ${RDEPEND} - dev-python/beautifulsoup4[${PYTHON_USEDEP}] - $(python_gen_cond_dep ' - dev-python/cffi[${PYTHON_USEDEP}] - ' 'python*') - dev-python/lxml[${PYTHON_USEDEP}] - dev-python/pytest[${PYTHON_USEDEP}] - ) -" - -src_unpack() { - cargo_src_unpack -} - -python_test() { - local -x UNSAFE_PYO3_SKIP_VERSION_CHECK=1 - - local examples=( - html-py-ever - namespace_package - rust_with_cffi - ) - for example_dir in ${examples[@]}; do - pushd examples/${example_dir} >/dev/null || die - einfo "Running ${example_dir} test" - esetup.py build --build-lib=build/lib - - case ${example_dir} in - html-py-ever) - pushd tests >/dev/null || die - local -x PYTHONPATH=../build/lib - ${EPYTHON} run_all.py || die "Tests failed with ${EPYTHON}" - popd >/dev/null || die - ;; - *) - pushd build/lib >/dev/null || die - epytest ../../tests - popd >/dev/null || die - ;; - esac - - rm -rf build || die - popd >/dev/null || die - done -} diff --git a/dev-python/tenacity/tenacity-8.4.1.ebuild b/dev-python/tenacity/tenacity-8.4.1.ebuild index aa1c4c49f3c1..f7ac16972c55 100644 --- a/dev-python/tenacity/tenacity-8.4.1.ebuild +++ b/dev-python/tenacity/tenacity-8.4.1.ebuild @@ -21,9 +21,23 @@ KEYWORDS="~amd64 ~arm64 ~riscv ~x86" BDEPEND=" dev-python/setuptools-scm[${PYTHON_USEDEP}] test? ( - >=dev-python/tornado-6.4-r1[${PYTHON_USEDEP}] - dev-python/typeguard[${PYTHON_USEDEP}] + $(python_gen_cond_dep ' + >=dev-python/tornado-6.4-r1[${PYTHON_USEDEP}] + dev-python/typeguard[${PYTHON_USEDEP}] + ' 3.{10..12}) ) " distutils_enable_tests pytest + +python_test() { + local EPYTEST_IGNORE=() + if ! has_version ">=dev-python/tornado-6.4-r1[${PYTHON_USEDEP}]"; then + EPYTEST_IGNORE+=( + tests/test_tornado.py + ) + fi + + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + epytest +} diff --git a/dev-python/wxpython/wxpython-4.2.1-r2.ebuild b/dev-python/wxpython/wxpython-4.2.1-r2.ebuild index ffdc1114156b..ec62390a1579 100644 --- a/dev-python/wxpython/wxpython-4.2.1-r2.ebuild +++ b/dev-python/wxpython/wxpython-4.2.1-r2.ebuild @@ -67,6 +67,13 @@ python_prepare_all() { eapply "${FILESDIR}/${PN}-4.2.0-no-webkit.patch" fi + # sip assumes unconditional C99 support since 6.8.4 + # which breaks when trying to use "sip/siplib/bool.cpp" + # https://github.com/Python-SIP/sip/commit/29fb3df49ff37df7aab9d5666fd72de95ac9e7f8 + if has_version ">=dev-python/sip-6.8.4"; then + sed -i '\|sip/siplib/bool\.cpp|d' wscript || die + fi + distutils-r1_python_prepare_all } -- cgit v1.3