summaryrefslogtreecommitdiff
path: root/eclass/python-utils-r1.eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-01-31 18:57:01 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-01-31 18:57:01 +0000
commit69051588e2f955485fe5d45d45e616bc60a2de57 (patch)
treeef8699cca7ce3773b1de747b167ceeacdc60cb92 /eclass/python-utils-r1.eclass
parentd7ed2b01311f15ba54fe8ea872aab7d59ab2b193 (diff)
gentoo resync : 31.01.2021
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass11
1 files changed, 8 insertions, 3 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 6d482aa106c0..dcc441b82098 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -40,7 +40,6 @@ inherit toolchain-funcs
# All supported Python implementations, most preferred last.
_PYTHON_ALL_IMPLS=(
pypy3
- python2_7
python3_7 python3_8 python3_9
)
readonly _PYTHON_ALL_IMPLS
@@ -52,7 +51,7 @@ readonly _PYTHON_ALL_IMPLS
_PYTHON_HISTORICAL_IMPLS=(
jython2_7
pypy pypy1_{8,9} pypy2_0
- python2_{5,6}
+ python2_{5..7}
python3_{1..6}
)
readonly _PYTHON_HISTORICAL_IMPLS
@@ -149,7 +148,13 @@ _python_set_impls() {
done
if [[ ! ${supp[@]} ]]; then
- die "No supported implementation in PYTHON_COMPAT."
+ # special-case python2_7 for python-any-r1
+ if [[ ${_PYTHON_ALLOW_PY27} ]] && has python2_7 "${PYTHON_COMPAT[@]}"
+ then
+ supp+=( python2_7 )
+ else
+ die "No supported implementation in PYTHON_COMPAT."
+ fi
fi
if [[ ${_PYTHON_SUPPORTED_IMPLS[@]} ]]; then