1 |
commit: 3a980b89c190cf3d84df63a33bb4540a3d45cb23 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Jun 20 07:16:24 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 23 21:44:09 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a980b89 |
7 |
|
8 |
python-utils-r1.eclass: Fix python_fix_shebang for py3.10+ |
9 |
|
10 |
We should be safe until Python 3.99 now ;-). |
11 |
|
12 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
13 |
|
14 |
eclass/python-utils-r1.eclass | 12 +++++++----- |
15 |
1 file changed, 7 insertions(+), 5 deletions(-) |
16 |
|
17 |
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass |
18 |
index b435ebaa7ad..2a34614bc7f 100644 |
19 |
--- a/eclass/python-utils-r1.eclass |
20 |
+++ b/eclass/python-utils-r1.eclass |
21 |
@@ -1120,20 +1120,22 @@ python_fix_shebang() { |
22 |
fi |
23 |
break |
24 |
;; |
25 |
- *python[23].[0123456789]|*pypy|*pypy3|*jython[23].[0123456789]) |
26 |
+ *python[23].[0-9]|*python3.[1-9][0-9]|*pypy|*pypy3|*jython[23].[0-9]) |
27 |
# Explicit mismatch. |
28 |
if [[ ! ${force} ]]; then |
29 |
error=1 |
30 |
else |
31 |
case "${i}" in |
32 |
- *python[23].[0123456789]) |
33 |
- from="python[23].[0123456789]";; |
34 |
+ *python[23].[0-9]) |
35 |
+ from="python[23].[0-9]";; |
36 |
+ *python3.[1-9][0-9]) |
37 |
+ from="python3.[1-9][0-9]";; |
38 |
*pypy) |
39 |
from="pypy";; |
40 |
*pypy3) |
41 |
from="pypy3";; |
42 |
- *jython[23].[0123456789]) |
43 |
- from="jython[23].[0123456789]";; |
44 |
+ *jython[23].[0-9]) |
45 |
+ from="jython[23].[0-9]";; |
46 |
*) |
47 |
die "${FUNCNAME}: internal error in 2nd pattern match";; |
48 |
esac |