summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-06-20 08:57:02 +0200
committerMichał Górny <mgorny@gentoo.org>2021-06-23 23:44:04 +0200
commit964f5c61816659b0138c8fe98593786d9da7f084 (patch)
treee6c132a74261df148550361d194e53bea0d61cbb /eclass/python-utils-r1.eclass
parentpython-utils-r1.eclass: Use 'dosym -r' in EAPI 8 (diff)
downloadgentoo-964f5c61816659b0138c8fe98593786d9da7f084.tar.gz
gentoo-964f5c61816659b0138c8fe98593786d9da7f084.tar.bz2
gentoo-964f5c61816659b0138c8fe98593786d9da7f084.zip
python-utils-r1.eclass: Remove python_optimize support for py<3.5
Remove the support code for Python 2.7, <3.5, as well as PyPy2.7. These are no longer supported at runtime, so byte-compiling should not be used for these impls. Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass8
1 files changed, 2 insertions, 6 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 4de550aa6a63..e3b8e51065a3 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -625,18 +625,14 @@ python_optimize() {
instpath=/${instpath##/}
case "${EPYTHON}" in
- python2.7|python3.[34])
- "${PYTHON}" -m compileall -q -f -d "${instpath}" "${d}"
- "${PYTHON}" -OO -m compileall -q -f -d "${instpath}" "${d}"
- ;;
python*|pypy3)
- # both levels of optimization are separate since 3.5
+ # both levels of optimization are separate since py3.5
"${PYTHON}" -m compileall -q -f -d "${instpath}" "${d}"
"${PYTHON}" -O -m compileall -q -f -d "${instpath}" "${d}"
"${PYTHON}" -OO -m compileall -q -f -d "${instpath}" "${d}"
;;
*)
- "${PYTHON}" -m compileall -q -f -d "${instpath}" "${d}"
+ die "Unknown impl for python_optimize: ${EPYTHON}"
;;
esac
done