mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
python-utils-r1.eclass: Add support for python3.11
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
@@ -43,7 +43,7 @@ inherit multiprocessing toolchain-funcs
|
||||
# All supported Python implementations, most preferred last.
|
||||
_PYTHON_ALL_IMPLS=(
|
||||
pypy3
|
||||
python3_{8..10}
|
||||
python3_{8..11}
|
||||
)
|
||||
readonly _PYTHON_ALL_IMPLS
|
||||
|
||||
@@ -83,7 +83,7 @@ _python_verify_patterns() {
|
||||
local impl pattern
|
||||
for pattern; do
|
||||
case ${pattern} in
|
||||
-[23]|3.[89]|3.10)
|
||||
-[23]|3.[89]|3.1[01])
|
||||
continue
|
||||
;;
|
||||
esac
|
||||
@@ -132,7 +132,7 @@ _python_set_impls() {
|
||||
# please keep them in sync with _PYTHON_ALL_IMPLS
|
||||
# and _PYTHON_HISTORICAL_IMPLS
|
||||
case ${i} in
|
||||
pypy3|python2_7|python3_[89]|python3_10)
|
||||
pypy3|python2_7|python3_[89]|python3_1[01])
|
||||
;;
|
||||
jython2_7|pypy|pypy1_[89]|pypy2_0|python2_[5-6]|python3_[1-7])
|
||||
obsolete+=( "${i}" )
|
||||
@@ -245,7 +245,7 @@ _python_impl_matches() {
|
||||
[[ ${impl} == python${pattern/./_} || ${impl} == pypy3 ]] &&
|
||||
return 0
|
||||
;;
|
||||
3.8|3.10)
|
||||
3.8|3.1[01])
|
||||
[[ ${impl} == python${pattern/./_} ]] && return 0
|
||||
;;
|
||||
*)
|
||||
@@ -461,6 +461,8 @@ _python_export() {
|
||||
PYTHON_PKG_DEP=">=dev-lang/python-3.9.9-r1:3.9";;
|
||||
python3.10)
|
||||
PYTHON_PKG_DEP=">=dev-lang/python-3.10.0_p1-r1:3.10";;
|
||||
python3.11)
|
||||
PYTHON_PKG_DEP=">=dev-lang/python-3.11.0_beta1:3.11";;
|
||||
python*)
|
||||
PYTHON_PKG_DEP="dev-lang/python:${impl#python}";;
|
||||
pypy)
|
||||
|
||||
@@ -147,6 +147,20 @@ fi
|
||||
test_var PYTHON_PKG_DEP python3_10 '*dev-lang/python*:3.10'
|
||||
test_var PYTHON_SCRIPTDIR python3_10 /usr/lib/python-exec/python3.10
|
||||
|
||||
test_var EPYTHON python3_11 python3.11
|
||||
test_var PYTHON python3_11 /usr/bin/python3.11
|
||||
if [[ -x /usr/bin/python3.11 ]]; then
|
||||
abiflags=$(/usr/bin/python3.11 -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS"))')
|
||||
test_var PYTHON_SITEDIR python3_11 "/usr/lib/python3.11/site-packages"
|
||||
test_var PYTHON_INCLUDEDIR python3_11 "/usr/include/python3.11${abiflags}"
|
||||
test_var PYTHON_LIBPATH python3_11 "/usr/lib*/libpython3.11${abiflags}$(get_libname)"
|
||||
test_var PYTHON_CONFIG python3_11 "/usr/bin/python3.11${abiflags}-config"
|
||||
test_var PYTHON_CFLAGS python3_11 "*-I/usr/include/python3.11*"
|
||||
test_var PYTHON_LIBS python3_11 "*-lpython3.11*"
|
||||
fi
|
||||
test_var PYTHON_PKG_DEP python3_11 '*dev-lang/python*:3.11'
|
||||
test_var PYTHON_SCRIPTDIR python3_11 /usr/lib/python-exec/python3.11
|
||||
|
||||
test_var EPYTHON pypy3 pypy3
|
||||
test_var PYTHON pypy3 /usr/bin/pypy3
|
||||
if [[ -x /usr/bin/pypy3 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user