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 08/28] python-utils-r1.eclass: Fix python_fix_shebang for py3.10+
Date: Sun, 20 Jun 2021 09:58:55
Message-Id: 20210620095552.625633-9-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 00/28] python-r1 suite EAPI 8 support/cleanup by "Michał Górny"
1 We should be safe until Python 3.99 now ;-).
2
3 Signed-off-by: Michał Górny <mgorny@g.o>
4 ---
5 eclass/python-utils-r1.eclass | 12 +++++++-----
6 1 file changed, 7 insertions(+), 5 deletions(-)
7
8 diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
9 index a3d5770b7c08..7f3a0f2566ca 100644
10 --- a/eclass/python-utils-r1.eclass
11 +++ b/eclass/python-utils-r1.eclass
12 @@ -1125,20 +1125,22 @@ python_fix_shebang() {
13 fi
14 break
15 ;;
16 - *python[23].[0123456789]|*pypy|*pypy3|*jython[23].[0123456789])
17 + *python[23].[0-9]|*python3.[1-9][0-9]|*pypy|*pypy3|*jython[23].[0-9])
18 # Explicit mismatch.
19 if [[ ! ${force} ]]; then
20 error=1
21 else
22 case "${i}" in
23 - *python[23].[0123456789])
24 - from="python[23].[0123456789]";;
25 + *python[23].[0-9])
26 + from="python[23].[0-9]";;
27 + *python3.[1-9][0-9])
28 + from="python3.[1-9][0-9]";;
29 *pypy)
30 from="pypy";;
31 *pypy3)
32 from="pypy3";;
33 - *jython[23].[0123456789])
34 - from="jython[23].[0123456789]";;
35 + *jython[23].[0-9])
36 + from="jython[23].[0-9]";;
37 *)
38 die "${FUNCNAME}: internal error in 2nd pattern match";;
39 esac
40 --
41 2.32.0