summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2018-10-17 10:05:04 +0200
committerWerner Koch <wk@gnupg.org>2018-10-17 10:05:35 +0200
commitff6ff616aea6f59b7f2ce1176492850ecdf3851e (patch)
tree3faf53a722322607371d9ce372cc1ca090f42e54 /m4
parentd63d6d8b8030ec1dc19f9f66c8af3b2f3288d309 (diff)
downloadgpgme-ff6ff616aea6f59b7f2ce1176492850ecdf3851e.tar.gz
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 <wk@gnupg.org>
Diffstat (limited to 'm4')
-rw-r--r--m4/python.m49
1 files changed, 6 insertions, 3 deletions
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])