[git] GPGME - branch, master, updated. gpgme-1.8.0-101-g9d6825b

by Justus Winter cvs at cvs.gnupg.org
Tue Mar 14 12:22:20 CET 2017


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  9d6825be092f1590f28b5bab462eeb944d9b800c (commit)
       via  ac4849953860547b06a167ca9612c4de369d02b6 (commit)
       via  a4201035fdc050f337a6b9f520c8ddbb569e2eb4 (commit)
       via  6a371663886a7ba6073f385a3ab5f5a03de8e008 (commit)
       via  5189c08af9468cdeb6f16a6ecd0fee53e1e3aa0e (commit)
       via  067da472f919e78c95a0a01b68e79a8b7dff173b (commit)
      from  43aa3eed15dcc4f848915ceabeff35c29c1c57e4 (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 9d6825be092f1590f28b5bab462eeb944d9b800c
Author: Justus Winter <justus at g10code.com>
Date:   Tue Mar 14 11:10:21 2017 +0100

    python: Make error message more helpful.
    
    * lang/python/tests/run-tests.py: Make the error message shown when we
    cannot locate the python module in the build tree more helpful.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/lang/python/tests/run-tests.py b/lang/python/tests/run-tests.py
index e76acb2..c4af526 100644
--- a/lang/python/tests/run-tests.py
+++ b/lang/python/tests/run-tests.py
@@ -69,12 +69,17 @@ for interpreter in args.interpreters:
     version = subprocess.check_output(
         [interpreter, "-c", "import sys; print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))"]).strip().decode()
 
-    builddirs = glob.glob(os.path.join(args.builddir, "..",
-                                       "python{0}-gpg".format(version),
-                                       "build",
-                                       "lib*"+version))
-    assert len(builddirs) == 1, \
-        "Expected one build directory, got {0}".format(builddirs)
+    pattern = os.path.join(args.builddir, "..",
+                           "python{0}-gpg".format(version),
+                           "build",
+                           "lib*"+version)
+    builddirs = glob.glob(pattern)
+    if len(builddirs) == 0:
+        sys.exit("Build directory matching {0!r} not found.".format(pattern))
+    elif len(builddirs) > 1:
+        sys.exit("Multiple build directories matching {0!r} found: {1}".format(
+            pattern, builddirs))
+
     env = dict(os.environ)
     env["PYTHONPATH"] = builddirs[0]
 

commit ac4849953860547b06a167ca9612c4de369d02b6
Author: Justus Winter <justus at g10code.com>
Date:   Tue Mar 14 11:08:08 2017 +0100

    python: Make tests more robust.
    
    * lang/python/tests/support.py (TemporaryDirectory): Always use our
    own version even if 'tempfile.TemporaryDirectory' is provided, because
    we need to use 'shutil.rmtree(..., ignore_errors=True)' to avoid it
    tripping over gpg-agent deleting its own sockets.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/lang/python/tests/support.py b/lang/python/tests/support.py
index a381270..69aa7a4 100644
--- a/lang/python/tests/support.py
+++ b/lang/python/tests/support.py
@@ -78,17 +78,16 @@ def mark_key_trusted(ctx, key):
         ctx.op_edit(key, Editor().edit, sink, sink)
 
 
-# Python2/3 compatibility
-if hasattr(tempfile, "TemporaryDirectory"):
-    # Python3.2 and up
-    TemporaryDirectory = tempfile.TemporaryDirectory
-else:
-    class TemporaryDirectory(object):
-        def __enter__(self):
-            self.path = tempfile.mkdtemp()
-            return self.path
-        def __exit__(self, *args):
-            shutil.rmtree(self.path)
+# Python3.2 and up has tempfile.TemporaryDirectory, but we cannot use
+# that, because there shutil.rmtree is used without
+# ignore_errors=True, and that races against gpg-agent deleting its
+# sockets.
+class TemporaryDirectory(object):
+    def __enter__(self):
+        self.path = tempfile.mkdtemp()
+        return self.path
+    def __exit__(self, *args):
+        shutil.rmtree(self.path, ignore_errors=True)
 
 @contextlib.contextmanager
 def EphemeralContext():

commit a4201035fdc050f337a6b9f520c8ddbb569e2eb4
Author: Justus Winter <justus at g10code.com>
Date:   Tue Mar 14 11:22:28 2017 +0100

    python: Improve build system integration.
    
    * lang/python/Makefile.am: Use 'set -e' when chaining shell commands
    together in rules.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
index 2724d86..d91ead9 100644
--- a/lang/python/Makefile.am
+++ b/lang/python/Makefile.am
@@ -47,20 +47,19 @@ COPY_FILES_GPG = \
 # For VPATH builds we need to copy some files because Python's
 # distutils are not VPATH-aware.
 copystamp: $(COPY_FILES) $(COPY_FILES_GPG)
-	for F in $(COPY_FILES) $(COPY_FILES_GPG) ; do if [ $$F -nt $@ ]; then echo $F ; fi ; done
-	for VERSION in $(PYTHON_VERSIONS); do \
-	  $(MKDIR_P)              python$${VERSION}-gpg/gpg && \
-	  cp -R $(COPY_FILES)     python$${VERSION}-gpg && \
-	  cp setup.py             python$${VERSION}-gpg && \
-	  cp gpg/version.py       python$${VERSION}-gpg/gpg && \
-	  ln -sf "$(abs_top_srcdir)/src/data.h" python$${VERSION}-gpg && \
-	  ln -sf "$(abs_top_builddir)/config.h" python$${VERSION}-gpg && \
+	set -e ; for VERSION in $(PYTHON_VERSIONS); do \
+	  $(MKDIR_P)              python$${VERSION}-gpg/gpg ; \
+	  cp -R $(COPY_FILES)     python$${VERSION}-gpg ; \
+	  cp setup.py             python$${VERSION}-gpg ; \
+	  cp gpg/version.py       python$${VERSION}-gpg/gpg ; \
+	  ln -sf "$(abs_top_srcdir)/src/data.h" python$${VERSION}-gpg ; \
+	  ln -sf "$(abs_top_builddir)/config.h" python$${VERSION}-gpg ; \
 	  cp -R $(COPY_FILES_GPG) python$${VERSION}-gpg/gpg ; \
 	done
 	touch $@
 
 all-local: copystamp
-	set $(PYTHONS); for VERSION in $(PYTHON_VERSIONS); do \
+	set -e ; set $(PYTHONS); for VERSION in $(PYTHON_VERSIONS); do \
 	  PYTHON="$$1" ; shift ; \
 	  cd python$${VERSION}-gpg && \
 	  CFLAGS="$(CFLAGS)" \
@@ -102,9 +101,9 @@ clean-local:
 
 install-exec-local:
 	rm -f install_files.txt
-	set $(PYTHONS); for VERSION in $(PYTHON_VERSIONS); do \
+	set -e ; set $(PYTHONS); for VERSION in $(PYTHON_VERSIONS); do \
 	  PYTHON="$$1" ; shift ; \
-	  cd python$${VERSION}-gpg && \
+	  cd python$${VERSION}-gpg ; \
 	  $$PYTHON setup.py install \
 	  --prefix $(DESTDIR)$(prefix) \
 	  --record files.txt \

commit 6a371663886a7ba6073f385a3ab5f5a03de8e008
Author: Justus Winter <justus at g10code.com>
Date:   Mon Mar 13 15:37:15 2017 +0100

    build: Improve Python detection.
    
    * configure.ac: Do not error out too early if we don't find a matching
    Python version.  We handle this case later.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/configure.ac b/configure.ac
index ba26901..2701d41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -418,12 +418,13 @@ if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then
 	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
+	    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
@@ -441,17 +442,26 @@ 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])
-	    AX_PYTHON_DEVEL
-	    if test "$PYTHON_VERSION"; then
-		PYTHONS="$(echo $PYTHONS $PYTHON)"
-		PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)"
-	    fi
+	    AM_PATH_PYTHON([3.4], [
+		AX_PYTHON_DEVEL
+		if test "$PYTHON_VERSION"; then
+			PYTHONS="$(echo $PYTHONS $PYTHON)"
+			PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)"
+		fi
+	    ], :)
 	fi
 
+	# Recover some values lost in the second attempt to find Python.
+	PYTHON="$(echo $PYTHONS | cut -d ' ' -f 1)"
+	PYTHON_VERSION="$(echo $PYTHON_VERSIONS | cut -d ' ' -f 1)"
+
+	# Remove duplicates.
+	PYTHONS="$(echo $PYTHONS | tr '[[:space:]]' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/ $//')"
+	PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS | tr '[[:space:]]' '\n' | sort | uniq | tr '\n' ' ' | sed -e 's/ $//')"
+
 	if test "$PYTHON_VERSIONS"; then
-	   enabled_languages_v=$(echo $enabled_languages | sed "s/python\([[23]]\)\?/python ($PYTHON_VERSIONS)/")
-	   enabled_languages=$(echo $enabled_languages | sed "s/python\([[23]]\)\?/python/")
+	   enabled_languages_v=$(echo $enabled_languages | sed -Ee "s/python[[23]]?/python ($PYTHON_VERSIONS)/")
+	   enabled_languages=$(echo $enabled_languages | sed -Ee "s/python[[23]]?/python/")
 	else
             if test "$explicit_languages" = "1"; then
                 AC_MSG_ERROR([[

commit 5189c08af9468cdeb6f16a6ecd0fee53e1e3aa0e
Author: Justus Winter <justus at g10code.com>
Date:   Thu Mar 9 16:55:18 2017 +0100

    build: Tune M4 macros for our needs.
    
    * m4/ax_python_devel.m4: Do not emit 'HAVE_PYTHON'.
    * m4/python.m4 (_AM_PYTHON_INTERPRETER_LIST): Add newer Python
    versions, drop older ones.  Also, sort the list with older versions at
    the front, newer and generic versions towards the end.  This makes the
    algorithm pick the lowest version that meets the version requirement.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4
index de992c8..b990d5b 100644
--- a/m4/ax_python_devel.m4
+++ b/m4/ax_python_devel.m4
@@ -195,8 +195,11 @@ EOD`
 		fi
 
 		# Make the versioning information available to the compiler
-		AC_DEFINE_UNQUOTED([HAVE_PYTHON], ["$ac_python_version"],
-                                   [If available, contains the Python version number currently in use.])
+
+		# JW: We don't need it and it interferes with the hack
+		# to detect multiple Pyhton versions
+		#AC_DEFINE_UNQUOTED([HAVE_PYTHON], ["$ac_python_version"],
+                #                  [If available, contains the Python version number currently in use.])
 
 		# First, the library directory:
 		ac_python_libdir=`cat<<EOD | $PYTHON -
diff --git a/m4/python.m4 b/m4/python.m4
index 790e68b..13962f4 100644
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -37,8 +37,8 @@ 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],
-[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
- python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
+[python2.7 python2 python3.0 python3.1 python3.2 python3.3 python3.4 dnl
+ python3.5 python3.6 python3.7 python3.8 python3 python])
 
   AC_ARG_VAR([PYTHON], [the Python interpreter])
 

commit 067da472f919e78c95a0a01b68e79a8b7dff173b
Author: Justus Winter <justus at g10code.com>
Date:   Thu Mar 9 16:54:35 2017 +0100

    build: Add M4 macros for python.
    
    * m4/python.m4: New file.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/m4/python.m4 b/m4/python.m4
new file mode 100644
index 0000000..790e68b
--- /dev/null
+++ b/m4/python.m4
@@ -0,0 +1,239 @@
+## ------------------------                                 -*- Autoconf -*-
+## Python file handling
+## From Andrew Dalke
+## Updated by James Henstridge
+## ------------------------
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# ---------------------------------------------------------------------------
+# Adds support for distributing Python modules and packages.  To
+# install modules, copy them to $(pythondir), using the python_PYTHON
+# automake variable.  To install a package with the same name as the
+# automake package, install to $(pkgpythondir), or use the
+# pkgpython_PYTHON automake variable.
+#
+# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
+# locations to install python extension modules (shared libraries).
+# Another macro is required to find the appropriate flags to compile
+# extension modules.
+#
+# If your package is configured with a different prefix to python,
+# users will have to add the install directory to the PYTHONPATH
+# environment variable, or create a .pth file (see the python
+# documentation for details).
+#
+# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
+# cause an error if the version of python installed on the system
+# doesn't meet the requirement.  MINIMUM-VERSION should consist of
+# numbers and dots only.
+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],
+[python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl
+ python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0])
+
+  AC_ARG_VAR([PYTHON], [the Python interpreter])
+
+  m4_if([$1],[],[
+    dnl No version check is needed.
+    # Find any Python interpreter.
+    if test -z "$PYTHON"; then
+      AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
+    fi
+    am_display_PYTHON=python
+  ], [
+    dnl A version check is needed.
+    if test -n "$PYTHON"; then
+      # If the user set $PYTHON, use it and don't search something else.
+      AC_MSG_CHECKING([whether $PYTHON version is >= $1])
+      AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
+			      [AC_MSG_RESULT([yes])],
+			      [AC_MSG_RESULT([no])
+			       AC_MSG_ERROR([Python interpreter is too old])])
+      am_display_PYTHON=$PYTHON
+    else
+      # Otherwise, try each interpreter until we find one that satisfies
+      # 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
+	  test "$am_cv_pathless_PYTHON" = none && break
+	  AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
+	done])
+      # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
+      if test "$am_cv_pathless_PYTHON" = none; then
+	PYTHON=:
+      else
+        AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
+      fi
+      am_display_PYTHON=$am_cv_pathless_PYTHON
+    fi
+  ])
+
+  if test "$PYTHON" = :; then
+  dnl Run any user-specified action, or abort.
+    m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
+  else
+
+  dnl Query Python for its version number.  Getting [:3] seems to be
+  dnl the best way to do this; it's what "site.py" does in the standard
+  dnl library.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
+    [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
+  AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
+
+  dnl Use the values of $prefix and $exec_prefix for the corresponding
+  dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX.  These are made
+  dnl distinct variables so they can be overridden if need be.  However,
+  dnl general consensus is that you shouldn't need this ability.
+
+  AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
+  AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
+
+  dnl At times (like when building shared libraries) you may want
+  dnl to know which OS platform Python thinks this is.
+
+  AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
+    [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
+  AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
+
+  # Just factor out some code duplication.
+  am_python_setup_sysconfig="\
+import sys
+# Prefer sysconfig over distutils.sysconfig, for better compatibility
+# with python 3.x.  See automake bug#10227.
+try:
+    import sysconfig
+except ImportError:
+    can_use_sysconfig = 0
+else:
+    can_use_sysconfig = 1
+# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs:
+# <https://github.com/pypa/virtualenv/issues/118>
+try:
+    from platform import python_implementation
+    if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7':
+        can_use_sysconfig = 0
+except ImportError:
+    pass"
+
+  dnl Set up 4 directories:
+
+  dnl pythondir -- where to install python scripts.  This is the
+  dnl   site-packages directory, not the python standard library
+  dnl   directory like in previous automake betas.  This behavior
+  dnl   is more consistent with lispdir.m4 for example.
+  dnl Query distutils for this directory.
+  AC_CACHE_CHECK([for $am_display_PYTHON script directory],
+    [am_cv_python_pythondir],
+    [if test "x$prefix" = xNONE
+     then
+       am_py_prefix=$ac_default_prefix
+     else
+       am_py_prefix=$prefix
+     fi
+     am_cv_python_pythondir=`$PYTHON -c "
+$am_python_setup_sysconfig
+if can_use_sysconfig:
+    sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'})
+else:
+    from distutils import sysconfig
+    sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix')
+sys.stdout.write(sitedir)"`
+     case $am_cv_python_pythondir in
+     $am_py_prefix*)
+       am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
+       am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
+       ;;
+     *)
+       case $am_py_prefix in
+         /usr|/System*) ;;
+         *)
+	  am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
+	  ;;
+       esac
+       ;;
+     esac
+    ])
+  AC_SUBST([pythondir], [$am_cv_python_pythondir])
+
+  dnl pkgpythondir -- $PACKAGE directory under pythondir.  Was
+  dnl   PYTHON_SITE_PACKAGE in previous betas, but this naming is
+  dnl   more consistent with the rest of automake.
+
+  AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
+
+  dnl pyexecdir -- directory for installing python extension modules
+  dnl   (shared libraries)
+  dnl Query distutils for this directory.
+  AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
+    [am_cv_python_pyexecdir],
+    [if test "x$exec_prefix" = xNONE
+     then
+       am_py_exec_prefix=$am_py_prefix
+     else
+       am_py_exec_prefix=$exec_prefix
+     fi
+     am_cv_python_pyexecdir=`$PYTHON -c "
+$am_python_setup_sysconfig
+if can_use_sysconfig:
+    sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'})
+else:
+    from distutils import sysconfig
+    sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix')
+sys.stdout.write(sitedir)"`
+     case $am_cv_python_pyexecdir in
+     $am_py_exec_prefix*)
+       am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
+       am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
+       ;;
+     *)
+       case $am_py_exec_prefix in
+         /usr|/System*) ;;
+         *)
+	   am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
+	   ;;
+       esac
+       ;;
+     esac
+    ])
+  AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
+
+  dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
+
+  AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
+
+  dnl Run any user-specified action.
+  $2
+  fi
+
+])
+
+
+# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# ---------------------------------------------------------------------------
+# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
+# Run ACTION-IF-FALSE otherwise.
+# This test uses sys.hexversion instead of the string equivalent (first
+# word of sys.version), in order to cope with versions such as 2.2c1.
+# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
+AC_DEFUN([AM_PYTHON_CHECK_VERSION],
+ [prog="import sys
+# split strings by '.' and convert to numeric.  Append some zeros
+# because we need at least 4 digits for the hex conversion.
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
+minverhex = 0
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
+sys.exit(sys.hexversion < minverhex)"
+  AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])

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

Summary of changes:
 configure.ac                   |  38 ++++---
 lang/python/Makefile.am        |  21 ++--
 lang/python/tests/run-tests.py |  17 +--
 lang/python/tests/support.py   |  21 ++--
 m4/ax_python_devel.m4          |   7 +-
 m4/python.m4                   | 239 +++++++++++++++++++++++++++++++++++++++++
 6 files changed, 299 insertions(+), 44 deletions(-)
 create mode 100644 m4/python.m4


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




More information about the Gnupg-commits mailing list