Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 5/5] python-utils-r1.eclass: Update python_optimize for PyPy3.9
Date: Thu, 08 Dec 2022 18:55:29
Message-Id: 20221208185348.3599822-6-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 0/5] distutils-r1 & python-utils-r1: cleanup old stuff by "Michał Górny"
1 Signed-off-by: Michał Górny <mgorny@g.o>
2 ---
3 eclass/python-utils-r1.eclass | 5 +++--
4 1 file changed, 3 insertions(+), 2 deletions(-)
5
6 diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
7 index 84c37cd29d60..df955371483e 100644
8 --- a/eclass/python-utils-r1.eclass
9 +++ b/eclass/python-utils-r1.eclass
10 @@ -629,13 +629,14 @@ python_optimize() {
11
12 einfo "Optimize Python modules for ${instpath}"
13 case "${EPYTHON}" in
14 - python3.8|pypy3)
15 + python3.8)
16 # both levels of optimization are separate since 3.5
17 "${PYTHON}" -m compileall -j "${jobs}" -q -f -d "${instpath}" "${d}"
18 "${PYTHON}" -O -m compileall -j "${jobs}" -q -f -d "${instpath}" "${d}"
19 "${PYTHON}" -OO -m compileall -j "${jobs}" -q -f -d "${instpath}" "${d}"
20 ;;
21 - python*)
22 + python*|pypy3)
23 + # Python 3.9+
24 "${PYTHON}" -m compileall -j "${jobs}" -o 0 -o 1 -o 2 --hardlink-dupes -q -f -d "${instpath}" "${d}"
25 ;;
26 pypy)
27 --
28 2.38.1