commit: a118f0e456077da2052c8b3cde8f7b6f55bb78fb
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May 23 04:00:58 2023 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 23 04:36:32 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a118f0e4
python-utils-r1.eclass: Add python3_12 target
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
eclass/python-utils-r1.eclass | 10 ++++++----
eclass/tests/python-utils-r1.sh | 8 +++++++-
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 040d374bbfe0..d21e54c6ecc9 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -40,7 +40,7 @@ inherit multiprocessing toolchain-funcs
# All supported Python implementations, most preferred last.
_PYTHON_ALL_IMPLS=(
pypy3
- python3_{10..11}
+ python3_{10..12}
)
readonly _PYTHON_ALL_IMPLS
@@ -80,7 +80,7 @@ _python_verify_patterns() {
local impl pattern
for pattern; do
case ${pattern} in
- -[23]|3.[89]|3.1[01])
+ -[23]|3.[89]|3.1[012])
continue
;;
esac
@@ -129,7 +129,7 @@ _python_set_impls() {
# please keep them in sync with _PYTHON_ALL_IMPLS
# and _PYTHON_HISTORICAL_IMPLS
case ${i} in
- pypy3|python3_9|python3_1[01])
+ pypy3|python3_9|python3_1[0-2])
;;
jython2_7|pypy|pypy1_[89]|pypy2_0|python2_[5-7]|python3_[1-9])
obsolete+=( "${i}" )
@@ -236,7 +236,7 @@ _python_impl_matches() {
[[ ${impl} == python${pattern/./_} || ${impl}
== pypy3 ]] &&
return 0
;;
- 3.8|3.1[01])
+ 3.8|3.1[0-2])
[[ ${impl} == python${pattern/./_} ]] && return 0
;;
*)
@@ -444,6 +444,8 @@ _python_export() {
PYTHON_PKG_DEP=">=dev-lang/python-3.10.9-r1:3.10";;
python3.11)
PYTHON_PKG_DEP=">=dev-lang/python-3.11.1-r1:3.11";;
+ python3.12)
+
PYTHON_PKG_DEP=">=dev-lang/python-3.12.0_beta1:3.12";;
pypy3)
PYTHON_PKG_DEP='>=dev-python/pypy3-7.3.11-r1:0=';;
*)
diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index d8b414219704..ee09ae2c877c 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 11; do
+for minor in {10..12}; do
ebegin "Testing python3.${minor}"
eindent
test_var EPYTHON "python3_${minor}" "python3.${minor}"
@@ -201,10 +201,16 @@ 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" 1
test_is "_python_impl_matches pypy3 3.11" 1
+test_is "_python_impl_matches pypy3 3.12" 1
eoutdent
rm "${tmpfile}"