From 1534d50aaf24272ec425fa439389ef7e1f7bf174 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 20 Feb 2025 00:15:26 +0000 Subject: gentoo auto-resync : 20:02:2025 - 00:15:26 --- dev-python/build/Manifest | 3 +- dev-python/build/build-1.2.2_p1-r1.ebuild | 95 ++++++++++++++++++++++ dev-python/build/build-1.2.2_p1.ebuild | 90 -------------------- .../build/files/build-1.2.2_p1-gentoo-pip.patch | 28 +++++++ 4 files changed, 125 insertions(+), 91 deletions(-) create mode 100644 dev-python/build/build-1.2.2_p1-r1.ebuild delete mode 100644 dev-python/build/build-1.2.2_p1.ebuild create mode 100644 dev-python/build/files/build-1.2.2_p1-gentoo-pip.patch (limited to 'dev-python/build') diff --git a/dev-python/build/Manifest b/dev-python/build/Manifest index 4efad4d1d3b1..70b56541be8a 100644 --- a/dev-python/build/Manifest +++ b/dev-python/build/Manifest @@ -1,3 +1,4 @@ +AUX build-1.2.2_p1-gentoo-pip.patch 1045 BLAKE2B ea8b05bb1b162b59b2e64dec548b16f4c77e9c9d41c0675cf6b1622f65e39bdc3770bde195725cffa7fc1ea50723c51557468feecb981ab4c7820c5d93e3c5ac SHA512 4cdeb18670c09f81dcf91a1f75281c2fbc79ac61c1cf9f26604343b115b140a5c4d8b8664eb119c0b113ce5e6da0de82b94c05ecaf4d98dc1dcc2f188c666be1 DIST build-1.2.2.post1.gh.tar.gz 48790 BLAKE2B 6ccc68095a3135aca225ea4d2d68d8afaab640d533ca19ad0f7c45d1e40a74cfc6dc2313d07755b81151ef926b5ab6e67c9a07e0f642de969053e9539d7d294a SHA512 bdf023c6b578ea77c7fc49c71c7d908bcc9ff6b9255b2767e45b09aca0a39a5297d264695a864fe34772e5d8898a18a90f6e262514bf90daf14db762a8bbe4be -EBUILD build-1.2.2_p1.ebuild 2644 BLAKE2B 352b5013f737b8c80f0324d06cf4ae129b372893a95cc00e11536da2a1b6ffb3c3033ce028a659f6b391b3c175d24d18ef31e13037c267c568479a5a9adc6753 SHA512 0f5c2260d86a4251009ec733a51b54b37f41c5bd4a7d4d513f277c960836041face724ecb60875e8bce79b8114ef4ab7012f988c92f246dfbb0f65ec8b982712 +EBUILD build-1.2.2_p1-r1.ebuild 2736 BLAKE2B 58a36f18519a96e46c29c09cd7acc7f54cbed0ba1ba419f38f2ba385bd967a49b7565f2978f32d2b2195273a8026f4f1664b9cf66914be85561ce1157b436b02 SHA512 71c0f685adb8b6e1b07b576a57784f3e3b7ce0f87b2eeab5db7a89a29509df0b7a0f79c1fbcaecf34b57e8965bb7bd6c6bc7cf5d6e07ffc074e22a4f1c36f0ba MISC metadata.xml 361 BLAKE2B 1c46e1d83bec4a8aaedd932af700865009735ff75e3af63ef7c08f7c00883d5f658f86aec981cd48c8ef0ab0a287250a3a4fdfad42fb434f6c06d9f33f72f7d6 SHA512 89c86db40833c86e25f387c5bfa8952b62e983714be85af1e8ca2a6ef8a402b94cc32dfc18cda8d8850736aaabdb46c153743af9bcb027e86b2c1f085f6f2369 diff --git a/dev-python/build/build-1.2.2_p1-r1.ebuild b/dev-python/build/build-1.2.2_p1-r1.ebuild new file mode 100644 index 000000000000..1abc9dd82b84 --- /dev/null +++ b/dev-python/build/build-1.2.2_p1-r1.ebuild @@ -0,0 +1,95 @@ +# Copyright 2022-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=flit +PYTHON_TESTED=( python3_{10..13} pypy3 pypy3_11 ) +PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_13t ) + +inherit distutils-r1 + +MY_P=${P/_p/.post} +DESCRIPTION="A simple, correct PEP517 package builder" +HOMEPAGE=" + https://pypi.org/project/build/ + https://github.com/pypa/build/ +" +SRC_URI=" + https://github.com/pypa/build/archive/${PV/_p/.post}.tar.gz + -> ${MY_P}.gh.tar.gz +" +S=${WORKDIR}/${MY_P} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +IUSE="test-rust" + +RDEPEND=" + >=dev-python/packaging-19.1[${PYTHON_USEDEP}] + dev-python/pyproject-hooks[${PYTHON_USEDEP}] + $(python_gen_cond_dep ' + >=dev-python/tomli-1.1.0[${PYTHON_USEDEP}] + ' 3.10) +" +BDEPEND=" + test? ( + $(python_gen_cond_dep ' + >=dev-python/filelock-3[${PYTHON_USEDEP}] + >=dev-python/pytest-mock-2[${PYTHON_USEDEP}] + >=dev-python/pytest-rerunfailures-9.1[${PYTHON_USEDEP}] + >=dev-python/pytest-xdist-1.34[${PYTHON_USEDEP}] + >=dev-python/setuptools-56.0.0[${PYTHON_USEDEP}] + >=dev-python/virtualenv-20.0.35[${PYTHON_USEDEP}] + >=dev-python/wheel-0.36.0[${PYTHON_USEDEP}] + test-rust? ( + !s390? ( !sparc? ( dev-python/uv ) ) + ) + ' "${PYTHON_TESTED[@]}") + ) +" + +distutils_enable_tests pytest + +PATCHES=( + # https://github.com/pypa/build/pull/861 + "${FILESDIR}/${P}-gentoo-pip.patch" +) + +python_test() { + if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then + einfo "Skipping tests on ${EPYTHON}" + return + fi + + local EPYTEST_DESELECT=( + # broken by the presence of flit_core + tests/test_util.py::test_wheel_metadata_isolation + # broken by the presence of virtualenv (it changes the error + # messages, sic!) + 'tests/test_main.py::test_output[via-sdist-isolation]' + 'tests/test_main.py::test_output[wheel-direct-isolation]' + # broken when built in not normal tty on coloring + tests/test_main.py::test_colors + 'tests/test_main.py::test_output_env_subprocess_error[color]' + # Internet + 'tests/test_main.py::test_verbose_output[False-0]' + 'tests/test_main.py::test_verbose_output[False-1]' + # broken by uv being installed outside venv + tests/test_env.py::test_external_uv_detection_success + # broken by unbundled pip (TODO: fix pip eventually) + 'tests/test_projectbuilder.py::test_build_with_dep_on_console_script[False]' + ) + + if ! has_version "dev-python/uv"; then + EPYTEST_DESELECT+=( + tests/test_env.py::test_uv_impl_install_cmd_well_formed + 'tests/test_env.py::test_venv_creation[uv-venv+uv-None]' + ) + fi + + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 + local EPYTEST_XDIST=1 + epytest -m "not network" -p pytest_mock -p rerunfailures +} diff --git a/dev-python/build/build-1.2.2_p1.ebuild b/dev-python/build/build-1.2.2_p1.ebuild deleted file mode 100644 index ce998bf4e24a..000000000000 --- a/dev-python/build/build-1.2.2_p1.ebuild +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 2022-2025 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=flit -PYTHON_TESTED=( python3_{10..13} pypy3 pypy3_11 ) -PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_13t ) - -inherit distutils-r1 - -MY_P=${P/_p/.post} -DESCRIPTION="A simple, correct PEP517 package builder" -HOMEPAGE=" - https://pypi.org/project/build/ - https://github.com/pypa/build/ -" -SRC_URI=" - https://github.com/pypa/build/archive/${PV/_p/.post}.tar.gz - -> ${MY_P}.gh.tar.gz -" -S=${WORKDIR}/${MY_P} - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="test-rust" - -RDEPEND=" - >=dev-python/packaging-19.1[${PYTHON_USEDEP}] - dev-python/pyproject-hooks[${PYTHON_USEDEP}] - $(python_gen_cond_dep ' - >=dev-python/tomli-1.1.0[${PYTHON_USEDEP}] - ' 3.10) -" -BDEPEND=" - test? ( - $(python_gen_cond_dep ' - >=dev-python/filelock-3[${PYTHON_USEDEP}] - >=dev-python/pytest-mock-2[${PYTHON_USEDEP}] - >=dev-python/pytest-rerunfailures-9.1[${PYTHON_USEDEP}] - >=dev-python/pytest-xdist-1.34[${PYTHON_USEDEP}] - >=dev-python/setuptools-56.0.0[${PYTHON_USEDEP}] - >=dev-python/virtualenv-20.0.35[${PYTHON_USEDEP}] - >=dev-python/wheel-0.36.0[${PYTHON_USEDEP}] - test-rust? ( - !s390? ( !sparc? ( dev-python/uv ) ) - ) - ' "${PYTHON_TESTED[@]}") - ) -" - -distutils_enable_tests pytest - -python_test() { - if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then - einfo "Skipping tests on ${EPYTHON}" - return - fi - - local EPYTEST_DESELECT=( - # broken by the presence of flit_core - tests/test_util.py::test_wheel_metadata_isolation - # broken by the presence of virtualenv (it changes the error - # messages, sic!) - 'tests/test_main.py::test_output[via-sdist-isolation]' - 'tests/test_main.py::test_output[wheel-direct-isolation]' - # broken when built in not normal tty on coloring - tests/test_main.py::test_colors - 'tests/test_main.py::test_output_env_subprocess_error[color]' - # Internet - 'tests/test_main.py::test_verbose_output[False-0]' - 'tests/test_main.py::test_verbose_output[False-1]' - # broken by uv being installed outside venv - tests/test_env.py::test_external_uv_detection_success - # broken by unbundled pip (TODO: fix pip eventually) - 'tests/test_projectbuilder.py::test_build_with_dep_on_console_script[False]' - ) - - if ! has_version "dev-python/uv"; then - EPYTEST_DESELECT+=( - tests/test_env.py::test_uv_impl_install_cmd_well_formed - 'tests/test_env.py::test_venv_creation[uv-venv+uv-None]' - ) - fi - - local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 - local EPYTEST_XDIST=1 - epytest -m "not network" -p pytest_mock -p rerunfailures -} diff --git a/dev-python/build/files/build-1.2.2_p1-gentoo-pip.patch b/dev-python/build/files/build-1.2.2_p1-gentoo-pip.patch new file mode 100644 index 000000000000..4335500e73a8 --- /dev/null +++ b/dev-python/build/files/build-1.2.2_p1-gentoo-pip.patch @@ -0,0 +1,28 @@ +diff --git a/src/build/env.py b/src/build/env.py +index b8c7b5f6..f10cf4bf 100644 +--- a/src/build/env.py ++++ b/src/build/env.py +@@ -11,6 +11,7 @@ + import sysconfig + import tempfile + import typing ++import warnings + + from collections.abc import Collection, Mapping + +@@ -158,6 +159,15 @@ def _has_valid_outer_pip(self) -> bool | None: + This checks for a valid global pip. Returns None if pip is missing, False + if pip is too old, and True if it can be used. + """ ++ # `pip install --python` is nonfunctional on Gentoo debundled pip. ++ # Detect that by checking if pip._vendor` module exists. However, ++ # searching for pip could yield warnings from _distutils_hack, ++ # so silence them. ++ with warnings.catch_warnings(): ++ warnings.simplefilter('ignore') ++ if importlib.util.find_spec('pip._vendor') is None: ++ return False # pragma: no cover ++ + # Version to have added the `--python` option. + return _has_dependency('pip', '22.3') + -- cgit v1.2.3