[master] 57c1d53e5 python 3 takes priority over python 2

Federico G. Schwindt fgsch at lodoss.net
Tue Jul 3 19:26:12 UTC 2018


commit 57c1d53e5adcd71add274809c7fd9c0132bb127f
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date:   Tue Jul 3 19:52:31 2018 +0100

    python 3 takes priority over python 2
    
    This was the original intent but got lost in autoconf translation.

diff --git a/varnish.m4 b/varnish.m4
index 8a92d5f10..f052aa145 100644
--- a/varnish.m4
+++ b/varnish.m4
@@ -130,10 +130,12 @@ AC_DEFUN([_VARNISH_CHECK_DEVEL], [
 # ---------------------
 AC_DEFUN([_VARNISH_CHECK_PYTHON], [
 
-	AM_PATH_PYTHON([2.7], [], [
+	AC_PATH_PROGS(PYTHON, [python3.7 python3.6 python3.5 python3.4 python2.7 python3 python2 python], [
+		AC_MSG_ERROR([no suitable Python interpreter found])
+	])
+	AM_PYTHON_CHECK_VERSION([$PYTHON], [2.7], [], [
 		AC_MSG_ERROR([Python >= 2.7 is required.])
 	])
-
 ])
 
 # _VARNISH_VMOD_LDFLAGS


More information about the varnish-commit mailing list