$NetBSD: patch-configure,v 1.6 2021/09/29 11:46:39 adam Exp $ Lower python requirement to the lowest available 3.x version in pkgsrc. --- configure.orig 2021-09-21 13:09:48.000000000 +0000 +++ configure @@ -19131,13 +19131,13 @@ fi if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3.8" >&5 -printf %s "checking whether $PYTHON version is >= 3.8... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 3.6" >&5 +printf %s "checking whether $PYTHON version is >= 3.6... " >&6; } prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x -minver = list(map(int, '3.8'.split('.'))) + [0, 0, 0] +minver = list(map(int, '3.6'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] @@ -19159,8 +19159,8 @@ fi else # Otherwise, try each interpreter until we find one that satisfies # VERSION. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 3.8" >&5 -printf %s "checking for a Python interpreter with version >= 3.8... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 3.6" >&5 +printf %s "checking for a Python interpreter with version >= 3.6... " >&6; } if test ${am_cv_pathless_PYTHON+y} then : printf %s "(cached) " >&6 @@ -19172,7 +19172,7 @@ else $as_nop # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x -minver = list(map(int, '3.8'.split('.'))) + [0, 0, 0] +minver = list(map(int, '3.6'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] @@ -19254,7 +19254,7 @@ if test ${am_cv_python_version+y} then : printf %s "(cached) " >&6 else $as_nop - am_cv_python_version=`$PYTHON -c "import sys; print ('%u.%u' % sys.version_info[:2])"` + am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 printf "%s\n" "$am_cv_python_version" >&6; }