From ff6ff616aea6f59b7f2ce1176492850ecdf3851e Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 17 Oct 2018 10:05:04 +0200 Subject: python: Auto-check for all installed python versions. * m4/python.m4 (AM_PATH_PYTHON): Add a 4th arg. * configure.ac (available_languages): Remove separate python2 and python3 and keep just python. Simplify test for pythons. Use an explicit list of python versions to test. -- This seems to be a starightforward chnage to support more than two python versions. I am not sure why we had that complicated thing before. On my box I get builds and run tests for 2.7, 3.4 and 3.5. If 3.6, 3.7 or 3.8 are installed they should also work. GnuPG-bug-id: 3354 Signed-off-by: Werner Koch --- m4/python.m4 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'm4') diff --git a/m4/python.m4 b/m4/python.m4 index 7097db2d..7adcdead 100644 --- a/m4/python.m4 +++ b/m4/python.m4 @@ -2,7 +2,8 @@ ## Python file handling ## From Andrew Dalke ## Updated by James Henstridge -## ------------------------ +## Upated by Werner Koch 2018-10-17 +## --------------------------------- # Copyright (C) 1999-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -10,7 +11,8 @@ # with or without modifications, as long as this notice is preserved. -# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND] +# [INTERPRETER-LIST]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON @@ -67,7 +69,8 @@ AC_DEFUN([AM_PATH_PYTHON], # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ - for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do + for am_cv_pathless_PYTHON dnl + in m4_if([$4],[],[_AM_PYTHON_INTERPRETER_LIST],[$4]) none; do test "$am_cv_pathless_PYTHON" = none && break AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) -- cgit v1.2.1