commit:     92cf8fae5081be46c320e45f52322849394b57f3
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 22 10:41:40 2025 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu May  1 11:36:14 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92cf8fae

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

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
Part-of: https://github.com/gentoo/gentoo/pull/41697
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 eclass/python-utils-r1.eclass   | 18 +++++++-----------
 eclass/tests/python-utils-r1.sh | 21 +--------------------
 2 files changed, 8 insertions(+), 31 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 458c0b0b2387..860250cbe1eb 100644
--- a/eclass/python-utils-r1.eclass
+++ b/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}" )
                                        ;;
                                *)
@@ -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}]}"
                                                ;;

diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index 4969da103566..c08c224cfdbd 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -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

Reply via email to