Add a version check to the Python test, so that we don't try to run
authorGreg Hudson <ghudson@mit.edu>
Wed, 17 Mar 2010 19:11:09 +0000 (19:11 +0000)
committerGreg Hudson <ghudson@mit.edu>
Wed, 17 Mar 2010 19:11:09 +0000 (19:11 +0000)
k5test in Python 2.3 or below.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23812 dc483132-0cff-0310-8789-dd5450dbe970

src/configure.in

index 45c543902cca4eb81b52a426765061a90ba76e40..46f2a25c8a7f617e1617b720f6e8a3ecc92a793b 100644 (file)
@@ -928,10 +928,19 @@ else
 fi
 AC_SUBST(HAVE_RUNTEST)
 
-# for Python tests
+# For Python tests.
 AC_CHECK_PROG(PYTHON,python,python)
 if test x"$PYTHON" != x; then
-       HAVE_PYTHON=yes
+       # k5test.py requires python 2.4 (for the subprocess module).
+       pyversion=$(python --version 2>&1 | awk '{print $2}')
+       case $pyversion in
+       1.*|2.0.*|2.1.*|2.2.*|2.3.*)
+               HAVE_PYTHON=no
+               ;;
+       *)
+               HAVE_PYTHON=yes
+               ;;
+       esac
 else
        HAVE_PYTHON=no
 fi