From: Mark Andrews Date: Wed, 9 Nov 2016 22:49:12 +0000 (+1100) Subject: 4513. [cleanup] Minimum Python versions are now 2.7 and 3.2. X-Git-Tag: v9.12.0a1~656 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=472e99cfa69b16d39a02516925b540f6b51de8d4;p=thirdparty%2Fbind9.git 4513. [cleanup] Minimum Python versions are now 2.7 and 3.2. [RT #43566] --- diff --git a/CHANGES b/CHANGES index 6fe2486a1fa..1bde903a641 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +4513. [cleanup] Minimum Python versions are now 2.7 and 3.2. + [RT #43566] + 4512. [bug] win32: @GEOIP_INC@ missing from delv.vcxproj.in. [RT #43556] diff --git a/configure b/configure index 87f16d07aac..8f5a08231ab 100755 --- a/configure +++ b/configure @@ -11824,7 +11824,7 @@ else fi -python="python python3 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5 python2.4" +python="python python3 python3.5 python3.4 python3.3 python3.2 python2 python2.7" testargparse='try: import argparse except: exit(1)' @@ -11832,6 +11832,10 @@ except: exit(1)' testply='try: from ply import * except: exit(1)' +testminvers='import sys +if (sys.version_info < (2,7)) or (sys.version_info < (3,2) and sys.version_info >= (3,0)): + exit(1)' + case "$use_python" in no) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python support" >&5 @@ -11892,6 +11896,18 @@ done if test "X$PYTHON" = "X"; then continue; fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python2 version >= 2.7 or python3 version >= 3.2" >&5 +$as_echo_n "checking python2 version >= 2.7 or python3 version >= 3.2... " >&6; } + if ${PYTHON:-false} -c "$testminvers"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 +$as_echo "not found" >&6; } + unset ac_cv_path_PYTHON + unset PYTHON + continue + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking python module 'argparse'" >&5 $as_echo_n "checking python module 'argparse'... " >&6; } if ${PYTHON:-false} -c "$testargparse"; then @@ -11986,6 +12002,14 @@ done ;; esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking python2 version >= 2.7 or python3 version >= 3.2" >&5 +$as_echo_n "checking python2 version >= 2.7 or python3 version >= 3.2... " >&6; } + if ${PYTHON:-false} -c "$testminvers"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +$as_echo "found" >&6; } + else + as_fn_error $? "not found" "$LINENO" 5 + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking python module 'argparse'" >&5 $as_echo_n "checking python module 'argparse'... " >&6; } if ${PYTHON:-false} -c "$testargparse"; then diff --git a/configure.in b/configure.in index 9f6e2775a76..20751d0e2b8 100644 --- a/configure.in +++ b/configure.in @@ -208,7 +208,7 @@ AC_ARG_WITH(python, [ --with-python=PATH specify path to python interpreter], use_python="$withval", use_python="unspec") -python="python python3 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2 python2.7 python2.6 python2.5 python2.4" +python="python python3 python3.5 python3.4 python3.3 python3.2 python2 python2.7" testargparse='try: import argparse except: exit(1)' @@ -216,6 +216,10 @@ except: exit(1)' testply='try: from ply import * except: exit(1)' +testminvers='import sys +if (sys.version_info < (2,7)) or (sys.version_info < (3,2) and sys.version_info >= (3,0)): + exit(1)' + case "$use_python" in no) AC_MSG_CHECKING([for python support]) @@ -230,6 +234,15 @@ case "$use_python" in if test "X$PYTHON" = "X"; then continue; fi + AC_MSG_CHECKING([python2 version >= 2.7 or python3 version >= 3.2]) + if ${PYTHON:-false} -c "$testminvers"; then + AC_MSG_RESULT([found]) + else + AC_MSG_RESULT([not found]) + unset ac_cv_path_PYTHON + unset PYTHON + continue + fi AC_MSG_CHECKING([python module 'argparse']) if ${PYTHON:-false} -c "$testargparse"; then AC_MSG_RESULT([found]) @@ -272,6 +285,12 @@ case "$use_python" in AC_PATH_PROGS(PYTHON, $use_python) ;; esac + AC_MSG_CHECKING([python2 version >= 2.7 or python3 version >= 3.2]) + if ${PYTHON:-false} -c "$testminvers"; then + AC_MSG_RESULT([found]) + else + AC_MSG_ERROR([not found]) + fi AC_MSG_CHECKING([python module 'argparse']) if ${PYTHON:-false} -c "$testargparse"; then AC_MSG_RESULT([found, using $PYTHON])