summaryrefslogtreecommitdiff
path: root/eclass/python-utils-r1.eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2016-06-05 09:16:52 +0200
committerMichał Górny <mgorny@gentoo.org>2016-06-06 21:40:30 +0200
commit4fe3143d1649f711e34257b235c6c32567ec903a (patch)
treef6886223e83a8a456c1de6bb7950d238189be6a0 /eclass/python-utils-r1.eclass
parentea1d100da4d130d0493025cfebf6f56905f6a837 (diff)
downloadgentoo-4fe3143d1649f711e34257b235c6c32567ec903a.tar.gz
gentoo-4fe3143d1649f711e34257b235c6c32567ec903a.tar.xz
python-utils-r1.eclass: Add additional .opt-1 compilation for py3.5+
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-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 0f9b58f6fce..717123cc5f9 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}"
;;
*)