[git] GPGME - branch, master, updated. gpgme-1.12.0-13-gff6ff61

by Werner Koch cvs at cvs.gnupg.org
Wed Oct 17 10:06:18 CEST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  ff6ff616aea6f59b7f2ce1176492850ecdf3851e (commit)
      from  d63d6d8b8030ec1dc19f9f66c8af3b2f3288d309 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ff6ff616aea6f59b7f2ce1176492850ecdf3851e
Author: Werner Koch <wk at gnupg.org>
Date:   Wed Oct 17 10:05:04 2018 +0200

    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 at gnupg.org>

diff --git a/configure.ac b/configure.ac
index e0823f5..728445d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,7 +180,7 @@ have_w64_system=no
 have_macos_system=no
 build_w32_glib=no
 build_w32_qt=no
-available_languages="cl cpp python python2 python3 qt"
+available_languages="cl cpp python qt"
 default_languages="cl cpp python qt"
 case "${host}" in
     x86_64-*mingw32*)
@@ -375,13 +375,9 @@ fi
 AC_SUBST(HAVE_DOT)
 
 # Python bindings.
-LIST_MEMBER("python2", $enabled_languages)
-found_py2=$found
-LIST_MEMBER("python3", $enabled_languages)
-found_py3=$found
 LIST_MEMBER("python", $enabled_languages)
 found_py=$found
-if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then
+if test "$found_py" = "1"; then
     AX_PKG_SWIG
     if test -z "$SWIG"; then
         if test "$explicit_languages" = "1"; then
@@ -393,36 +389,15 @@ if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then
             enabled_languages=$(echo $enabled_languages | sed 's/python//')
         fi
     else
-        # Reset all the stuff, just to be sure.
+        # Reset the version collecting vars.
 	PYTHONS=
 	PYTHON_VERSIONS=
-	unset PYTHON
-	unset PYTHON_VERSION
-	unset PYTHON_CPPFLAGS
-	unset PYTHON_LDFLAGS
-	unset PYTHON_SITE_PKG
-	unset PYTHON_EXTRA_LIBS
-	unset PYTHON_EXTRA_LDFLAGS
-	unset ac_cv_path_PYTHON
-	unset am_cv_pathless_PYTHON
-	unset am_cv_python_version
-	unset am_cv_python_platform
-	unset am_cv_python_pythondir
-	unset am_cv_python_pyexecdir
-
-	if test "$found_py" = "1" -o "$found_py2" = "1"; then
-	    AM_PATH_PYTHON([2.7], [
-		AX_PYTHON_DEVEL
-		if test "$PYTHON_VERSION"; then
-			PYTHONS="$(echo $PYTHONS $PYTHON)"
-			PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)"
-		fi
-	    ], :)
-	fi
 
 	if test "$found_py" = "1" -o "$found_py3" = "1"; then
-	    # Reset everything, so that we can look for another Python.
-	    unset PYTHON
+	  # Reset everything, so that we can look for another Python.
+          m4_foreach([mym4pythonver],
+                     [[2.7],[3.4],[3.5],[3.6],[3.7],[3.8],[all]],
+           [unset PYTHON
 	    unset PYTHON_VERSION
 	    unset PYTHON_CPPFLAGS
 	    unset PYTHON_LDFLAGS
@@ -435,13 +410,14 @@ if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then
 	    unset am_cv_python_platform
 	    unset am_cv_python_pythondir
 	    unset am_cv_python_pyexecdir
-	    AM_PATH_PYTHON([3.4], [
+	    AM_PATH_PYTHON(mym4pythonver, [
 		AX_PYTHON_DEVEL
 		if test "$PYTHON_VERSION"; then
 			PYTHONS="$(echo $PYTHONS $PYTHON)"
 			PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)"
 		fi
-	    ], :)
+	    ], :, m4_if([mym4pythonver],[all],[],[python]mym4pythonver))
+           ])
 	fi
 
 	# Recover some values lost in the second attempt to find Python.
diff --git a/m4/python.m4 b/m4/python.m4
index 7097db2..7adcdea 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])

-----------------------------------------------------------------------

Summary of changes:
 configure.ac | 44 ++++++++++----------------------------------
 m4/python.m4 |  9 ++++++---
 2 files changed, 16 insertions(+), 37 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list