We should be safe until Python 3.99 now ;-).

Signed-off-by: Michał Górny <mgo...@gentoo.org>
---
 eclass/python-utils-r1.eclass | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index a3d5770b7c08..7f3a0f2566ca 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1125,20 +1125,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
-- 
2.32.0


Reply via email to