summaryrefslogtreecommitdiff
path: root/eclass/python-utils-r1.eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass20
1 files changed, 2 insertions, 18 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 3a4a3f19a1be..b61bf730b8c4 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -629,24 +629,8 @@ python_optimize() {
instpath=/${instpath##/}
einfo "Optimize Python modules for ${instpath}"
- case "${EPYTHON}" in
- python3.8)
- # both levels of optimization are separate since 3.5
- "${PYTHON}" -m compileall -j "${jobs}" -q -f -d "${instpath}" "${d}"
- "${PYTHON}" -O -m compileall -j "${jobs}" -q -f -d "${instpath}" "${d}"
- "${PYTHON}" -OO -m compileall -j "${jobs}" -q -f -d "${instpath}" "${d}"
- ;;
- python*|pypy3*)
- # Python 3.9+
- "${PYTHON}" -m compileall -j "${jobs}" -o 0 -o 1 -o 2 --hardlink-dupes -q -f -d "${instpath}" "${d}"
- ;;
- pypy|jython2.7)
- "${PYTHON}" -m compileall -q -f -d "${instpath}" "${d}"
- ;;
- *)
- die "${FUNCNAME}: unexpected EPYTHON=${EPYTHON}"
- ;;
- esac
+ "${PYTHON}" -m compileall -j "${jobs}" -o 0 -o 1 -o 2 \
+ --hardlink-dupes -q -f -d "${instpath}" "${d}"
done
}