diff options
author | Michał Górny <mgorny@gentoo.org> | 2021-06-20 09:16:24 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2021-06-23 23:44:09 +0200 |
commit | 3a980b89c190cf3d84df63a33bb4540a3d45cb23 (patch) | |
tree | 0bcb340080d92d3e3da68ca2039a5396d2b53d7b /eclass | |
parent | python-utils-r1.eclass: Deprecated and EAPI8-ban python_is_python3 (diff) | |
download | gentoo-3a980b89c190cf3d84df63a33bb4540a3d45cb23.tar.gz gentoo-3a980b89c190cf3d84df63a33bb4540a3d45cb23.tar.bz2 gentoo-3a980b89c190cf3d84df63a33bb4540a3d45cb23.zip |
python-utils-r1.eclass: Fix python_fix_shebang for py3.10+
We should be safe until Python 3.99 now ;-).
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/python-utils-r1.eclass | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index b435ebaa7ad6..2a34614bc7fc 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1120,20 +1120,22 @@ python_fix_shebang() { fi break ;; - *python[23].[0123456789]|*pypy|*pypy3|*jython[23].[0123456789]) + *python[23].[0-9]|*python3.[1-9][0-9]|*pypy|*pypy3|*jython[23].[0-9]) # Explicit mismatch. if [[ ! ${force} ]]; then error=1 else case "${i}" in - *python[23].[0123456789]) - from="python[23].[0123456789]";; + *python[23].[0-9]) + from="python[23].[0-9]";; + *python3.[1-9][0-9]) + from="python3.[1-9][0-9]";; *pypy) from="pypy";; *pypy3) from="pypy3";; - *jython[23].[0123456789]) - from="jython[23].[0123456789]";; + *jython[23].[0-9]) + from="jython[23].[0-9]";; *) die "${FUNCNAME}: internal error in 2nd pattern match";; esac |