1 --- automake-1.16.5/m4/python.m4.orig 2022-04-05 16:36:02.262782055 +0200
2 +++ automake-1.16.5/m4/python.m4 2022-04-05 13:55:30.657947863 +0200
4 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
6 # split strings by '.' and convert to numeric. Append some zeros
7 -# because we need at least 4 digits for the hex conversion.
8 -# map returns an iterator in Python 3.0 and a list in 2.x
9 -minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
11 -# xrange is not present in Python 3.0 and range returns an iterator
12 -for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
13 -sys.exit(sys.hexversion < minverhex)"
14 +# because we need at least 3 digits for comparison.
15 +minver = tuple(map(int, '$2'.split('.'))) + (0, 0, 0)
16 +sys.exit(sys.version_info[[:3]] < minver[[:3]])"
17 AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])