]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4513. [cleanup] Minimum Python versions are now 2.7 and 3.2.
authorMark Andrews <marka@isc.org>
Wed, 9 Nov 2016 22:49:12 +0000 (09:49 +1100)
committerMark Andrews <marka@isc.org>
Wed, 9 Nov 2016 22:49:12 +0000 (09:49 +1100)
                        [RT #43566]

CHANGES
configure
configure.in

diff --git a/CHANGES b/CHANGES
index 6fe2486a1fa1aa76c3cae54a85520ad56f08db83..1bde903a641691268af0dc1d1eb573fdd324b98d 100644 (file)
--- 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]
 
index 87f16d07aac6d28251e84abc706b0e160ba5021f..8f5a08231ab9afedcbc50dc54a2c7abd89bf32e0 100755 (executable)
--- 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
index 9f6e2775a76bbc8720541e6b4e5917dbc3d5a05d..20751d0e2b81b225be327fde189e2a9ed833e25e 100644 (file)
@@ -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])