From 5b1915ddf98b64efdd976ca4d8fce232faf7a247 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 1 Apr 2024 14:13:28 +0100 Subject: gentoo auto-resync : 01:04:2024 - 14:13:28 --- eclass/Manifest.gz | Bin 39606 -> 39603 bytes eclass/distutils-r1.eclass | 98 ++++++++++++++++++------------------------ eclass/git-r3.eclass | 18 +++++--- eclass/python-utils-r1.eclass | 3 ++ 4 files changed, 57 insertions(+), 62 deletions(-) (limited to 'eclass') diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz index 973a3764d900..a2eed06bee51 100644 Binary files a/eclass/Manifest.gz and b/eclass/Manifest.gz differ diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index 9be994595529..7a314673a90b 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -124,8 +124,6 @@ esac # # - pbr - pbr backend # -# - pdm - pdm.pep517 backend -# # - pdm-backend - pdm.backend backend # # - poetry - poetry-core backend @@ -230,7 +228,7 @@ _distutils_set_globals() { ;; hatchling) bdep+=' - >=dev-python/hatchling-1.17.0[${PYTHON_USEDEP}] + >=dev-python/hatchling-1.21.1[${PYTHON_USEDEP}] ' ;; jupyter) @@ -240,7 +238,7 @@ _distutils_set_globals() { ;; maturin) bdep+=' - >=dev-util/maturin-1.0.1[${PYTHON_USEDEP}] + >=dev-util/maturin-1.4.0[${PYTHON_USEDEP}] ' ;; no) @@ -249,42 +247,37 @@ _distutils_set_globals() { ;; meson-python) bdep+=' - >=dev-python/meson-python-0.13.1[${PYTHON_USEDEP}] + >=dev-python/meson-python-0.15.0[${PYTHON_USEDEP}] ' ;; pbr) bdep+=' - >=dev-python/pbr-5.11.1[${PYTHON_USEDEP}] - ' - ;; - pdm) - bdep+=' - >=dev-python/pdm-pep517-1.1.4[${PYTHON_USEDEP}] + >=dev-python/pbr-6.0.0[${PYTHON_USEDEP}] ' ;; pdm-backend) bdep+=' - >=dev-python/pdm-backend-2.1.0[${PYTHON_USEDEP}] + >=dev-python/pdm-backend-2.1.8[${PYTHON_USEDEP}] ' ;; poetry) bdep+=' - >=dev-python/poetry-core-1.6.1[${PYTHON_USEDEP}] + >=dev-python/poetry-core-1.9.0[${PYTHON_USEDEP}] ' ;; scikit-build-core) bdep+=' - >=dev-python/scikit-build-core-0.4.6[${PYTHON_USEDEP}] + >=dev-python/scikit-build-core-0.8.2[${PYTHON_USEDEP}] ' ;; setuptools) bdep+=' - >=dev-python/setuptools-67.8.0-r1[${PYTHON_USEDEP}] + >=dev-python/setuptools-69.0.3[${PYTHON_USEDEP}] ' ;; sip) bdep+=' - >=dev-python/sip-6.7.9[${PYTHON_USEDEP}] + >=dev-python/sip-6.8.3[${PYTHON_USEDEP}] ' ;; standalone) @@ -299,7 +292,7 @@ _distutils_set_globals() { eqawarn "is enabled." fi else - local setuptools_dep='>=dev-python/setuptools-67.8.0-r1[${PYTHON_USEDEP}]' + local setuptools_dep='>=dev-python/setuptools-69.0.3[${PYTHON_USEDEP}]' case ${DISTUTILS_USE_SETUPTOOLS:-bdepend} in no|manual) @@ -508,7 +501,7 @@ distutils_enable_sphinx() { _DISTUTILS_SPHINX_PLUGINS=( "${@}" ) local deps autodoc=1 d - deps=">=dev-python/sphinx-5.3.0[\${PYTHON_USEDEP}]" + deps=">=dev-python/sphinx-7.2.6[\${PYTHON_USEDEP}]" for d; do if [[ ${d} == --no-autodoc ]]; then autodoc= @@ -532,7 +525,7 @@ distutils_enable_sphinx() { use doc || return 0 local p - for p in ">=dev-python/sphinx-5.3.0" \ + for p in ">=dev-python/sphinx-7.2.6" \ "${_DISTUTILS_SPHINX_PLUGINS[@]}" do python_has_version "${p}[${PYTHON_USEDEP}]" || @@ -540,7 +533,7 @@ distutils_enable_sphinx() { done } else - deps=">=dev-python/sphinx-5.3.0" + deps=">=dev-python/sphinx-7.2.6" fi sphinx_compile_all() { @@ -579,8 +572,6 @@ distutils_enable_sphinx() { # with the specified test runner. Also copies the current value # of RDEPEND to test?-BDEPEND. The test-runner argument must be one of: # -# - nose: nosetests (dev-python/nose) -# # - pytest: dev-python/pytest # # - setup.py: setup.py test (no deps included) @@ -615,29 +606,33 @@ distutils_enable_tests() { [[ ${#} -eq 1 ]] || die "${FUNCNAME} takes exactly one argument: test-runner" local test_deps=${RDEPEND} - local test_pkgs case ${1} in - nose) - test_pkgs='>=dev-python/nose-1.3.7_p20221026[${PYTHON_USEDEP}]' - ;; pytest) - test_pkgs='>=dev-python/pytest-7.3.1[${PYTHON_USEDEP}]' + local test_pkgs='>=dev-python/pytest-7.4.4[${PYTHON_USEDEP}]' if [[ -n ${EPYTEST_TIMEOUT} ]]; then test_pkgs+=' dev-python/pytest-timeout[${PYTHON_USEDEP}]' fi if [[ ${EPYTEST_XDIST} ]]; then test_pkgs+=' dev-python/pytest-xdist[${PYTHON_USEDEP}]' fi + + if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then + test_deps+=" ${test_pkgs//'${PYTHON_USEDEP}'/${PYTHON_USEDEP}}" + else + test_deps+=" $(python_gen_cond_dep " + ${test_pkgs} + ")" + fi ;; setup.py) ;; unittest) # unittest-or-fail is needed in py<3.12 - test_deps+=" - $(python_gen_cond_dep ' + local test_pkgs="$(python_gen_cond_dep ' dev-python/unittest-or-fail[${PYTHON_USEDEP}] - ' 3.10 3.11) - " + ' 3.10 3.11 + )" + [[ -n ${test_pkgs} ]] && test_deps+=" ${test_pkgs}" ;; *) die "${FUNCNAME}: unsupported argument: ${1}" @@ -646,15 +641,6 @@ distutils_enable_tests() { _DISTUTILS_TEST_RUNNER=${1} python_test() { distutils-r1_python_test; } - if [[ -n ${test_pkgs} ]]; then - if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then - test_deps+=" ${test_pkgs//'${PYTHON_USEDEP}'/${PYTHON_USEDEP}}" - else - test_deps+=" $(python_gen_cond_dep " - ${test_pkgs} - ")" - fi - fi if [[ -n ${test_deps} ]]; then IUSE+=" test" RESTRICT+=" !test? ( test )" @@ -1002,12 +988,6 @@ _distutils-r1_print_package_versions() { dev-python/wheel ) ;; - pdm) - packages+=( - dev-python/pdm-pep517 - dev-python/setuptools - ) - ;; pdm-backend) packages+=( dev-python/pdm-backend @@ -1214,12 +1194,9 @@ _distutils-r1_backend_to_key() { pbr.build) echo pbr ;; - pdm.backend) + pdm.backend|pdm.pep517.api) echo pdm-backend ;; - pdm.pep517.api) - echo pdm - ;; poetry.core.masonry.api|poetry.masonry.api) echo poetry ;; @@ -1280,6 +1257,9 @@ _distutils-r1_get_backend() { flit.buildapi) new_backend=flit_core.buildapi ;; + pdm.pep517.api) + new_backend=pdm.backend + ;; poetry.masonry.api) new_backend=poetry.core.masonry.api ;; @@ -1334,14 +1314,23 @@ distutils_wheel_install() { printf '%s\n' "${cmd[*]}" "${cmd[@]}" || die "Wheel install failed" - # remove installed licenses + # remove installed licenses and other junk find "${root}$(python_get_sitedir)" -depth \ - \( -path '*.dist-info/COPYING*' \ - -o -path '*.dist-info/LICENSE*' \ + \( -ipath '*.dist-info/AUTHORS*' \ + -o -ipath '*.dist-info/CHANGELOG*' \ + -o -ipath '*.dist-info/CODE_OF_CONDUCT*' \ + -o -ipath '*.dist-info/COPYING*' \ + -o -ipath '*.dist-info/*LICEN[CS]E*' \ + -o -ipath '*.dist-info/NOTICE*' \ + -o -ipath '*.dist-info/*Apache*' \ + -o -ipath '*.dist-info/*GPL*' \ + -o -ipath '*.dist-info/*MIT*' \ + -o -path '*.dist-info/RECORD' \ -o -path '*.dist-info/license_files/*' \ -o -path '*.dist-info/license_files' \ -o -path '*.dist-info/licenses/*' \ -o -path '*.dist-info/licenses' \ + -o -path '*.dist-info/zip-safe' \ \) -delete || die } @@ -1607,9 +1596,6 @@ distutils-r1_python_test() { fi case ${_DISTUTILS_TEST_RUNNER} in - nose) - "${EPYTHON}" -m nose -v "${@}" - ;; pytest) epytest ;; diff --git a/eclass/git-r3.eclass b/eclass/git-r3.eclass index de89fdc3a223..565f6ada8382 100644 --- a/eclass/git-r3.eclass +++ b/eclass/git-r3.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2023 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: git-r3.eclass @@ -429,6 +429,7 @@ _git-r3_set_submodules() { l=${l#submodule.} local subname=${l%%.url=*} + local is_manually_specified= # filter out on EGIT_SUBMODULES if declare -p EGIT_SUBMODULES &>/dev/null; then @@ -449,13 +450,14 @@ _git-r3_set_submodules() { continue else einfo "Using submodule ${parent_path}${subname}" + is_manually_specified=1 fi fi # skip modules that have 'update = none', bug #487262. local upd=$(echo "${data}" | git config -f /dev/fd/0 \ submodule."${subname}".update) - [[ ${upd} == none ]] && continue + [[ ${upd} == none && ! ${is_manually_specified} ]] && continue # https://github.com/git/git/blob/master/refs.c#L31 # we are more restrictive than git itself but that should not @@ -813,13 +815,17 @@ git-r3_fetch() { if [[ ${EGIT_LFS} ]]; then # Fetch the LFS files from the current ref (if any) - local lfs_fetch_command=( git lfs fetch "${r}" ) + local lfs_fetch_command=( git lfs fetch "${r}" "${remote_ref}" ) case "${EGIT_LFS_CLONE_TYPE}" in shallow) - lfs_fetch_command+=( - --prune - ) + if [[ -d ${GIT_DIR}/lfs/objects ]] && ! rmdir "${GIT_DIR}"/lfs/objects 2> /dev/null; then + # Only prune if the lfs directory is not empty. + # The prune command can take a very long time to resolve even if there are no lfs objects. + lfs_fetch_command+=( + --prune + ) + fi ;; single) ;; diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index caa39813feec..bbf751399476 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1349,6 +1349,9 @@ epytest() { # override filterwarnings=error, we do not really want -Werror # for end users, as it tends to fail on new warnings from deps -Wdefault + # however, do error out if the package failed to load + # an appropriate async plugin + -Werror::pytest.PytestUnhandledCoroutineWarning # override color output "--color=${color}" # count is more precise when we're dealing with a large number -- cgit v1.2.3