1 |
commit: 7fb83c87d07d9488fe6e7f9f79834ececad90790 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 24 11:41:02 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 24 11:41:59 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7fb83c87 |
7 |
|
8 |
python-utils-r1.eclass: Revert "Remove python_optimize support..." |
9 |
|
10 |
python_optimize is still used in dev-python/pypy. |
11 |
|
12 |
Reverts: 964f5c61816659b0138c8fe98593786d9da7f084 |
13 |
Closes: https://bugs.gentoo.org/798330 |
14 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
15 |
|
16 |
eclass/python-utils-r1.eclass | 8 ++++++-- |
17 |
1 file changed, 6 insertions(+), 2 deletions(-) |
18 |
|
19 |
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass |
20 |
index d43311762f9..7488802332f 100644 |
21 |
--- a/eclass/python-utils-r1.eclass |
22 |
+++ b/eclass/python-utils-r1.eclass |
23 |
@@ -597,14 +597,18 @@ python_optimize() { |
24 |
instpath=/${instpath##/} |
25 |
|
26 |
case "${EPYTHON}" in |
27 |
+ python2.7|python3.[34]) |
28 |
+ "${PYTHON}" -m compileall -q -f -d "${instpath}" "${d}" |
29 |
+ "${PYTHON}" -OO -m compileall -q -f -d "${instpath}" "${d}" |
30 |
+ ;; |
31 |
python*|pypy3) |
32 |
- # both levels of optimization are separate since py3.5 |
33 |
+ # both levels of optimization are separate since 3.5 |
34 |
"${PYTHON}" -m compileall -q -f -d "${instpath}" "${d}" |
35 |
"${PYTHON}" -O -m compileall -q -f -d "${instpath}" "${d}" |
36 |
"${PYTHON}" -OO -m compileall -q -f -d "${instpath}" "${d}" |
37 |
;; |
38 |
*) |
39 |
- die "Unknown impl for python_optimize: ${EPYTHON}" |
40 |
+ "${PYTHON}" -m compileall -q -f -d "${instpath}" "${d}" |
41 |
;; |
42 |
esac |
43 |
done |