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 <mgo...@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 }