From 6cf3fd1fce21d863e544e5eff9d01f7b32d3dd1d Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 5 May 2025 07:09:56 +0000 Subject: [PATCH] eclass/python-utils-r1: Sync with Gentoo It's from Gentoo commit d133f3d0eb162f6d6e1385f9c96f9814315cd9c9. --- .../eclass/python-utils-r1.eclass | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/python-utils-r1.eclass b/sdk_container/src/third_party/portage-stable/eclass/python-utils-r1.eclass index 458c0b0b23..ef05a58e1b 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/python-utils-r1.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/python-utils-r1.eclass @@ -39,9 +39,9 @@ inherit multiprocessing toolchain-funcs # @DESCRIPTION: # All supported Python implementations, most preferred last. _PYTHON_ALL_IMPLS=( - pypy3 pypy3_11 + pypy3_11 python3_13t - python3_{10..13} + python3_{11..13} ) readonly _PYTHON_ALL_IMPLS @@ -51,9 +51,9 @@ readonly _PYTHON_ALL_IMPLS # All historical Python implementations that are no longer supported. _PYTHON_HISTORICAL_IMPLS=( jython2_7 - pypy pypy1_{8,9} pypy2_0 + pypy pypy1_{8,9} pypy2_0 pypy3 python2_{5..7} - python3_{1..9} + python3_{1..10} ) readonly _PYTHON_HISTORICAL_IMPLS @@ -137,9 +137,9 @@ _python_set_impls() { # please keep them in sync with _PYTHON_ALL_IMPLS # and _PYTHON_HISTORICAL_IMPLS case ${i} in - pypy3|pypy3_11|python3_9|python3_1[0-3]|python3_13t) + pypy3_11|python3_9|python3_1[1-3]|python3_13t) ;; - jython2_7|pypy|pypy1_[89]|pypy2_0|python2_[5-7]|python3_[1-9]) + jython2_7|pypy|pypy1_[89]|pypy2_0|pypy3|python2_[5-7]|python3_[1-9]|python3_10) obsolete+=( "${i}" ) ;; *) @@ -208,6 +208,8 @@ _python_impl_matches() { local impl=${1/./_} pattern shift + # note: do not add "return 1" below, the function is supposed + # to iterate until it matches something for pattern; do case ${pattern} in -2|python2*|pypy) @@ -229,8 +231,6 @@ _python_impl_matches() { return 0 ;; 3.10) - [[ ${impl} == python${pattern/./_} || ${impl} == pypy3 ]] && - return 0 ;; 3.8|3.9|3.1[1-3]) [[ ${impl%t} == python${pattern/./_} || ${impl} == pypy${pattern/./_} ]] && @@ -449,9 +449,6 @@ _python_export() { python*) PYTHON_PKG_DEP="dev-lang/python:${impl#python}${PYTHON_REQ_USE:+[${PYTHON_REQ_USE}]}" ;; - pypy3) - PYTHON_PKG_DEP="dev-lang/pypy:3.10=[symlink${PYTHON_REQ_USE:+,${PYTHON_REQ_USE}}]" - ;; pypy3.*) PYTHON_PKG_DEP="dev-lang/pypy:${impl#pypy}=${PYTHON_REQ_USE:+[${PYTHON_REQ_USE}]}" ;;