python-utils-r1.eclass: Disable Python 3.10 / PyPy 3.10 targets

Signed-off-by: Michał Górny <mgorny@gentoo.org>
Part-of: https://github.com/gentoo/gentoo/pull/41697
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2025-04-22 12:41:40 +02:00
parent 9c475b3af1
commit 92cf8fae50
2 changed files with 8 additions and 31 deletions

View File

@@ -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}" )
;;
*)
@@ -229,8 +229,7 @@ _python_impl_matches() {
return 0
;;
3.10)
[[ ${impl} == python${pattern/./_} || ${impl} == pypy3 ]] &&
return 0
return 1
;;
3.8|3.9|3.1[1-3])
[[ ${impl%t} == python${pattern/./_} || ${impl} == pypy${pattern/./_} ]] &&
@@ -449,9 +448,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}]}"
;;

View File

@@ -64,7 +64,7 @@ tmpfile=$(mktemp)
inherit python-utils-r1
for minor in {10..13} 13t; do
for minor in {11..13} 13t; do
ebegin "Testing python3.${minor}"
eindent
test_var EPYTHON "python3_${minor}" "python3.${minor}"
@@ -119,19 +119,6 @@ for minor in {10..13} 13t; do
eoutdent
done
ebegin "Testing pypy3"
eindent
test_var EPYTHON pypy3 pypy3
test_var PYTHON pypy3 /usr/bin/pypy3
if [[ -x /usr/bin/pypy3 ]]; then
test_var PYTHON_SITEDIR pypy3 "/usr/lib*/pypy3.*/site-packages"
test_var PYTHON_INCLUDEDIR pypy3 "/usr/include/pypy3.*"
fi
test_var PYTHON_PKG_DEP pypy3 '*dev-lang/pypy*:3.10=\[symlink\]'
PYTHON_REQ_USE=sqlite test_var PYTHON_PKG_DEP pypy3 '*dev-lang/pypy*:3.10=\[symlink,sqlite\]'
test_var PYTHON_SCRIPTDIR pypy3 /usr/lib/python-exec/pypy3
eoutdent
for minor in 11; do
ebegin "Testing pypy3.${minor}"
eindent
@@ -216,18 +203,12 @@ test_is "_python_impl_matches python3_6 python*" 0
test_is "_python_impl_matches python3_7 python*" 0
test_is "_python_impl_matches pypy3 python*" 1
set +f
test_is "_python_impl_matches python3_10 3.10" 0
test_is "_python_impl_matches python3_10 3.11" 1
test_is "_python_impl_matches python3_10 3.12" 1
test_is "_python_impl_matches python3_11 3.10" 1
test_is "_python_impl_matches python3_11 3.11" 0
test_is "_python_impl_matches python3_11 3.12" 1
test_is "_python_impl_matches python3_12 3.10" 1
test_is "_python_impl_matches python3_12 3.11" 1
test_is "_python_impl_matches python3_12 3.12" 0
test_is "_python_impl_matches pypy3 3.10" 0
test_is "_python_impl_matches pypy3 3.11" 1
test_is "_python_impl_matches pypy3 3.12" 1
test_is "_python_impl_matches pypy3_11 3.10" 1
test_is "_python_impl_matches pypy3_11 3.11" 0
test_is "_python_impl_matches pypy3_11 3.12" 1