commit: 327899889ff0d4841870c0a81fa5adaa4b3fada0
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May 6 09:00:03 2025 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu May 8 12:32:47 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32789988
python-utils-r1.eclass: Remove old code paths for python_optimize
Remove the old code paths that used to provide `python_optimize()`
for Python 3.8 and Python 2.7 / PyPy. I thought we were keeping them
for dev-lang/pypy ebuilds but apparently we're calling compileall
directly there.
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
eclass/python-utils-r1.eclass | 20 ++------------------
1 file 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
}