summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eclass/python-utils-r1.eclass4
-rwxr-xr-xeclass/tests/python-utils-r1.sh16
2 files changed, 17 insertions, 3 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 4af710da363b..1067d2367aba 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -41,7 +41,7 @@ inherit toolchain-funcs
_PYTHON_ALL_IMPLS=(
pypy3
python2_7
- python3_6 python3_7 python3_8
+ python3_6 python3_7 python3_8 python3_9
)
readonly _PYTHON_ALL_IMPLS
@@ -77,7 +77,7 @@ _python_impl_supported() {
# keep in sync with _PYTHON_ALL_IMPLS!
# (not using that list because inline patterns shall be faster)
case "${impl}" in
- python2_7|python3_[678]|pypy3)
+ python2_7|python3_[6789]|pypy3)
return 0
;;
jython2_7|pypy|pypy1_[89]|pypy2_0|python2_[56]|python3_[12345])
diff --git a/eclass/tests/python-utils-r1.sh b/eclass/tests/python-utils-r1.sh
index 192c1183e800..86b87ec173d4 100755
--- a/eclass/tests/python-utils-r1.sh
+++ b/eclass/tests/python-utils-r1.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -115,6 +115,20 @@ fi
test_var PYTHON_PKG_DEP python3_8 '*dev-lang/python*:3.8'
test_var PYTHON_SCRIPTDIR python3_8 /usr/lib/python-exec/python3.8
+test_var EPYTHON python3_9 python3.9
+test_var PYTHON python3_9 /usr/bin/python3.9
+if [[ -x /usr/bin/python3.9 ]]; then
+ abiflags=$(/usr/bin/python3.9 -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS"))')
+ test_var PYTHON_SITEDIR python3_9 "/usr/lib/python3.9/site-packages"
+ test_var PYTHON_INCLUDEDIR python3_9 "/usr/include/python3.9${abiflags}"
+ test_var PYTHON_LIBPATH python3_9 "/usr/lib*/libpython3.9${abiflags}$(get_libname)"
+ test_var PYTHON_CONFIG python3_9 "/usr/bin/python3.9${abiflags}-config"
+ test_var PYTHON_CFLAGS python3_9 "*-I/usr/include/python3.9*"
+ test_var PYTHON_LIBS python3_9 "*-lpython3.9*"
+fi
+test_var PYTHON_PKG_DEP python3_9 '*dev-lang/python*:3.9'
+test_var PYTHON_SCRIPTDIR python3_9 /usr/lib/python-exec/python3.9
+
test_var EPYTHON pypy3 pypy3
test_var PYTHON pypy3 /usr/bin/pypy3
if [[ -x /usr/bin/pypy3 ]]; then