From 104635eb503ec764146731888a6975b4329660fd Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Wed, 22 Mar 2017 15:33:06 +0100 Subject: [PATCH] python: Improve Python detection. * m4/python.m4 (_AM_PYTHON_INTERPRETER_LIST): Prefer the generic 'pythonX' over 'pythonX.Y'. This way we select the users preferred version for both flavors. Prefer 'python' over 'python3' but not over 'python2' so that the algorithm still finds a 'python2' even if 'python' is a Python3. Fixes-commit: 5189c08af9468cdeb6f16a6ecd0fee53e1e3aa0e Signed-off-by: Justus Winter --- m4/python.m4 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/m4/python.m4 b/m4/python.m4 index 13962f48..822b2ddf 100644 --- a/m4/python.m4 +++ b/m4/python.m4 @@ -37,8 +37,10 @@ AC_DEFUN([AM_PATH_PYTHON], dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], -[python2.7 python2 python3.0 python3.1 python3.2 python3.3 python3.4 dnl - python3.5 python3.6 python3.7 python3.8 python3 python]) +[python2 python2.7 dnl + python dnl + python3 python3.0 python3.1 python3.2 python3.3 dnl + python3.4 python3.5 python3.6 python3.7 python3.8]) AC_ARG_VAR([PYTHON], [the Python interpreter])