summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--eclass/python-utils-r1.eclass6
1 files changed, 6 insertions, 0 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 0f9b58f6fce5..717123cc5f96 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -640,8 +640,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*)
+ # both levels of optimization are separate since 3.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}"
;;
*)