[master] 39551cd Check for python >= 2.7

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Feb 20 15:17:05 CET 2017


commit 39551cdc91e6de1b93c47a4988a3e2bfaca55913
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Mon Feb 20 15:16:16 2017 +0100

    Check for python >= 2.7

diff --git a/configure.ac b/configure.ac
index 3f057e3..4413e92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -345,19 +345,10 @@ else
 fi
 
 AM_MISSING_HAS_RUN
-AC_CHECK_PROGS(PYTHON, [python3 python3.1 python3.2 python2.7 python2 python], "no")
-if test "x$PYTHON" = "xno"; then
-  AC_MSG_ERROR([Python is needed to build Varnish, please install python 2.7 or later.])
-fi
 
-py_ver=`"$PYTHON" -V 2>&1`
-case "$py_ver" in
-Python?3.* | Python?2.[7-9].*)
-	;;
-*)
-	AC_MSG_ERROR([Python >= 2.7 is required])
-	;;
-esac
+AM_PATH_PYTHON([2.7], [], [
+	AC_MSG_ERROR([Python 2.7 or later is needed to build Varnish.])
+])
 
 AC_CHECK_DECL([SO_ACCEPTFILTER],
     AC_DEFINE(HAVE_ACCEPT_FILTERS,1,[Define to 1 if you have accept filters]),
diff --git a/varnish.m4 b/varnish.m4
index f3894ce..874c055 100644
--- a/varnish.m4
+++ b/varnish.m4
@@ -114,8 +114,8 @@ AC_DEFUN([_VARNISH_VMOD_CONFIG], [
 	AC_REQUIRE([AC_PROG_CPP])
 	AC_REQUIRE([AC_PROG_CPP_WERROR])
 
-	AM_PATH_PYTHON([2.6], [], [
-		AC_MSG_ERROR([Python is needed to build VMODs.])
+	AM_PATH_PYTHON([2.7], [], [
+		AC_MSG_ERROR([Python 2.7 or later is needed to build VMODs.])
 	])
 
 	AS_IF([test -z "$RST2MAN"], [



More information about the varnish-commit mailing list