[git] GPGME - branch, master, updated. gpgme-1.6.0-353-g24b4162

by Justus Winter cvs at cvs.gnupg.org
Wed Sep 14 12:20:08 CEST 2016


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  24b4162d908b48a92660020be0b776c2874fb05a (commit)
       via  dc23fdf55561659f9e9cff51668ac9c6c027c885 (commit)
       via  3b37c4efcf68657a856dbce60c0bd0fc78dd0770 (commit)
      from  3210f3e4725afc5ee2810b9a1361918ec9c42ca4 (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 24b4162d908b48a92660020be0b776c2874fb05a
Author: Justus Winter <justus at g10code.com>
Date:   Wed Sep 14 10:22:07 2016 +0200

    python: Build for both Python2 and Python3.
    
    * NEWS: Update.
    * configure.ac: Check for multiple Python versions.
    * lang/python/Makefile.am: Build and install for both Python versions.
    * lang/python/tests/Makefile.am: Test both versions.
    * lang/python/tests/run-tests.py: New test runner.
    
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/NEWS b/NEWS
index 621ce3f..e428bd5 100644
--- a/NEWS
+++ b/NEWS
@@ -5,7 +5,7 @@ Noteworthy changes in version 1.7.0 (unreleased) [C25/A14/R_]
 
  * Notation flags are now correctly set on verify.
 
- * Bindings for Python 3 are now included.
+ * Bindings for Python 2 and 3 are now included.
 
  * New global flag "require-gnupg" to set a minimal gnupg version.
 
diff --git a/configure.ac b/configure.ac
index bac7908..bcac13f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -176,7 +176,7 @@ have_w32_system=no
 have_w64_system=no
 build_w32_glib=no
 build_w32_qt=no
-available_languages="cl cpp python qt"
+available_languages="cl cpp python python2 python3 qt"
 default_languages="cl cpp python qt"
 case "${host}" in
     x86_64-*mingw32*)
@@ -369,8 +369,13 @@ 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)
-if test "$found" = "1"; then
+found_py=$found
+if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then
     AX_PKG_SWIG
     if test -z "$SWIG"; then
         if test "$explicit_languages" = "1"; then
@@ -382,11 +387,49 @@ if test "$found" = "1"; then
             enabled_languages=$(echo $enabled_languages | sed 's/python//')
         fi
     else
-        AM_PATH_PYTHON([3.4])
-        AX_SWIG_PYTHON
-	if test -z "$PYTHON_VERSION"; then
-           if test "$explicit_languages" = "1"; then
-              AC_MSG_ERROR([[
+        # Reset all the stuff, just to be sure.
+	PYTHONS=
+	PYTHON_VERSIONS=
+	unset PYTHON
+	unset PYTHON_VERSION
+	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])
+	    if test "$PYTHON"; 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
+	    unset PYTHON_VERSION
+	    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
+	    AM_PATH_PYTHON([3.4])
+	    if test "$PYTHON"; then
+		PYTHONS="$(echo $PYTHONS $PYTHON)"
+		PYTHON_VERSIONS="$(echo $PYTHON_VERSIONS $PYTHON_VERSION)"
+	    fi
+	fi
+
+	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/")
+	else
+            if test "$explicit_languages" = "1"; then
+                AC_MSG_ERROR([[
 ***
 *** Please install the python development packages.
 ***]])
@@ -394,6 +437,9 @@ if test "$found" = "1"; then
                 enabled_languages=$(echo $enabled_languages | sed 's/python//')
             fi
 	fi
+
+	AC_SUBST(PYTHONS, $PYTHONS)
+	AC_SUBST(PYTHON_VERSIONS, $PYTHON_VERSIONS)
     fi
 fi
 
@@ -843,7 +889,7 @@ echo "
         FD Passing:        $use_descriptor_passing
         GPGME Pthread:     $have_pthread
 
-        Language bindings: $enabled_languages
+        Language bindings: ${enabled_languages_v:-$enabled_languages}
 "
 if test "x${gpg_config_script_warn}" != x; then
 cat <<G10EOF
diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
index 8e18dab..9ec9c4a 100644
--- a/lang/python/Makefile.am
+++ b/lang/python/Makefile.am
@@ -54,8 +54,10 @@ copystamp: $(COPY_FILES) $(COPY_FILES_PYME)
 	touch $@
 
 all-local: copystamp
-	CFLAGS="$(CFLAGS) -I$(top_srcdir)" \
-	  $(PYTHON) setup.py build --verbose
+	for PYTHON in $(PYTHONS); do \
+	  CFLAGS="$(CFLAGS) -I$(top_srcdir)" \
+	    $$PYTHON setup.py build --verbose ; \
+	done
 
 dist/pyme3-$(VERSION).tar.gz dist/pyme3-$(VERSION).tar.gz.asc: copystamp
 	CFLAGS="$(CFLAGS) -I$(top_srcdir)" \
@@ -87,10 +89,16 @@ clean-local:
 	fi
 
 install-exec-local:
-	$(PYTHON) setup.py install \
+	rm -f install_files.txt
+	for PYTHON in $(PYTHONS); do \
+	  $$PYTHON setup.py install \
 	  --prefix $(DESTDIR)$(prefix) \
-	  --record $(DESTDIR)$(pythondir)/pyme/install_files.txt \
-	  --verbose
+	  --record files.txt \
+	  --verbose ; \
+	  cat files.txt >> install_files.txt ; \
+	  rm files.txt ; \
+	done
+	mv install_files.txt $(DESTDIR)$(pythondir)/pyme
 
 uninstall-local:
 	xargs <$(DESTDIR)$(pythondir)/pyme/install_files.txt -- rm -rf --
diff --git a/lang/python/tests/Makefile.am b/lang/python/tests/Makefile.am
index 83c4d8e..6a315d7 100644
--- a/lang/python/tests/Makefile.am
+++ b/lang/python/tests/Makefile.am
@@ -26,8 +26,8 @@ test_srcdir = $(top_srcdir)/tests/gpg
 TESTS_ENVIRONMENT = GNUPGHOME=$(abs_builddir) \
 	LC_ALL=C GPG_AGENT_INFO= \
 	top_srcdir=$(top_srcdir) \
-	LD_LIBRARY_PATH="../../../src/.libs:$(LD_LIBRARY_PATH)" \
-	PYTHONPATH=`echo $(abs_builddir)/../build/lib.*`
+	srcdir=$(srcdir) \
+	LD_LIBRARY_PATH="../../../src/.libs:$(LD_LIBRARY_PATH)"
 
 py_tests = t-wrapper.py \
 	t-callbacks.py \
@@ -52,8 +52,23 @@ py_tests = t-wrapper.py \
 	t-idiomatic.py \
 	t-protocol-assuan.py
 
-TESTS = initial.py $(py_tests) final.py
-EXTRA_DIST = support.py $(TESTS) encrypt-only.asc sign-only.asc
+XTESTS = initial.py $(py_tests) final.py
+EXTRA_DIST = support.py $(XTESTS) encrypt-only.asc sign-only.asc \
+             run-tests.py
+
+# XXX: Currently, one cannot override automake's 'check' target.  As a
+# workaround, we avoid defining 'TESTS', thus automake will not emit
+# the 'check' target.  For extra robustness, we merely define a
+# dependency on 'xcheck', so this hack should also work even if
+# automake would emit the 'check' target, as adding dependencies to
+# targets is okay.
+check: xcheck
+
+.PHONY: xcheck
+xcheck:
+	$(TESTS_ENVIRONMENT) $(PYTHON) $(srcdir)/run-tests.py \
+	  --interpreters="$(PYTHONS)" --srcdir=$(srcdir) $(TESTFLAGS) \
+	  $(XTESTS)
 
 CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \
 	gpg-agent.conf pubring.kbx~ gpg.conf pubring.gpg~ \
diff --git a/lang/python/tests/run-tests.py b/lang/python/tests/run-tests.py
new file mode 100644
index 0000000..55d3f11
--- /dev/null
+++ b/lang/python/tests/run-tests.py
@@ -0,0 +1,90 @@
+#!/usr/bin/env python
+
+# Copyright (C) 2016 g10 Code GmbH
+#
+# This file is part of GPGME.
+#
+# GPGME is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# GPGME is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
+# Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, see <http://www.gnu.org/licenses/>.
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+from __future__ import unicode_literals
+
+import argparse
+import glob
+import os
+import subprocess
+import sys
+
+class SplitAndAccumulate(argparse.Action):
+    def __call__(self, parser, namespace, values, option_string=None):
+        current = getattr(namespace, self.dest, list())
+        current.extend(values.split())
+        setattr(namespace, self.dest, current)
+
+parser = argparse.ArgumentParser(description='Run tests.')
+parser.add_argument('tests', metavar='TEST', type=str, nargs='+',
+                    help='A test to run')
+parser.add_argument('-v', '--verbose', action="store_true", default=False,
+                    help='Be verbose.')
+parser.add_argument('--interpreters', metavar='PYTHON', type=str,
+                    default=[], action=SplitAndAccumulate,
+                    help='Use these interpreters to run the tests, ' +
+                    'separated by spaces.')
+parser.add_argument('--srcdir', type=str,
+                    default=os.environ.get("srcdir", ""),
+                    help='Location of the tests.')
+parser.add_argument('--builddir', type=str,
+                    default=os.environ.get("abs_builddir", ""),
+                    help='Location of the tests.')
+
+args = parser.parse_args()
+if not args.interpreters:
+    args.interpreters = [sys.executable]
+
+out = sys.stdout if args.verbose else None
+err = sys.stderr if args.verbose else None
+
+def status_to_str(code):
+    return {0: "PASS", 77: "SKIP", 99: "ERROR"}.get(code, "FAIL")
+
+results = list()
+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, "..", "build",
+                                       "lib*"+version))
+    assert len(builddirs) == 1, \
+        "Expected one build directory, got {0}".format(builddirs)
+    env = dict(os.environ)
+    env["PYTHONPATH"] = builddirs[0]
+
+    print("Running tests using {0} ({1})...".format(interpreter, version))
+    for test in args.tests:
+        status = subprocess.call(
+            [interpreter, os.path.join(args.srcdir, test)],
+            env=env, stdout=out, stderr=err)
+        print("{0}: {1}".format(status_to_str(status), test))
+        results.append(status)
+
+def count(status):
+    return len(list(filter(lambda x: x == status, results)))
+def failed():
+    return len(list(filter(lambda x: x not in (0, 77, 99), results)))
+
+print("{0} tests run, {1} succeeded, {2} failed, {3} skipped.".format(
+    len(results), count(0), failed(), count(77)))
+sys.exit(len(results) - count(0))

commit dc23fdf55561659f9e9cff51668ac9c6c027c885
Author: Justus Winter <justus at g10code.com>
Date:   Wed Sep 14 11:39:00 2016 +0200

    python: Import from __future__ to align behavior of Python 2.7.
    
    --
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/lang/python/examples/assuan.py b/lang/python/examples/assuan.py
index e4822b7..22960d3 100644
--- a/lang/python/examples/assuan.py
+++ b/lang/python/examples/assuan.py
@@ -17,6 +17,9 @@
 
 """Demonstrate the use of the Assuan protocol engine"""
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import pyme
 
 with pyme.Context(protocol=pyme.constants.PROTOCOL_ASSUAN) as c:
diff --git a/lang/python/examples/decryption-filter.py b/lang/python/examples/decryption-filter.py
index dbd66fc..3007c2b 100644
--- a/lang/python/examples/decryption-filter.py
+++ b/lang/python/examples/decryption-filter.py
@@ -24,6 +24,9 @@ be used like this:
 
 """
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import pyme
 pyme.Context().decrypt(sys.stdin, sink=sys.stdout)
diff --git a/lang/python/examples/delkey.py b/lang/python/examples/delkey.py
index 491f38a..a02f412 100755
--- a/lang/python/examples/delkey.py
+++ b/lang/python/examples/delkey.py
@@ -19,6 +19,9 @@
 # Sample of key deletion
 # It deletes keys for joe at example.org generated by genkey.py script
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import pyme
 
 with pyme.Context() as c:
diff --git a/lang/python/examples/encrypt-to-all.py b/lang/python/examples/encrypt-to-all.py
index 304b474..bb8225b 100755
--- a/lang/python/examples/encrypt-to-all.py
+++ b/lang/python/examples/encrypt-to-all.py
@@ -22,6 +22,9 @@ This program will try to encrypt a simple message to each key on your
 keyring.  If your keyring has any invalid keys on it, those keys will
 be skipped and it will re-try the encryption."""
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import os
 import pyme
diff --git a/lang/python/examples/exportimport.py b/lang/python/examples/exportimport.py
index 8d76fa1..bc946bc 100755
--- a/lang/python/examples/exportimport.py
+++ b/lang/python/examples/exportimport.py
@@ -19,6 +19,9 @@
 # Sample of export and import of keys
 # It uses keys for joe+pyme at example.org generated by genkey.py script
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import os
 import pyme
diff --git a/lang/python/examples/genkey.py b/lang/python/examples/genkey.py
index 972fed7..ee70303 100755
--- a/lang/python/examples/genkey.py
+++ b/lang/python/examples/genkey.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import pyme
 
 # This is the example from the GPGME manual.
diff --git a/lang/python/examples/inter-edit.py b/lang/python/examples/inter-edit.py
index 2f8e4ef..459df11 100644
--- a/lang/python/examples/inter-edit.py
+++ b/lang/python/examples/inter-edit.py
@@ -18,6 +18,9 @@
 
 """Simple interactive editor to test editor scripts"""
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import pyme
 import pyme.constants.status
diff --git a/lang/python/examples/sign.py b/lang/python/examples/sign.py
index d376683..2f235ba 100755
--- a/lang/python/examples/sign.py
+++ b/lang/python/examples/sign.py
@@ -16,6 +16,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import pyme
 from pyme.constants.sig import mode
diff --git a/lang/python/examples/signverify.py b/lang/python/examples/signverify.py
index e7bf0c9..f12e065 100755
--- a/lang/python/examples/signverify.py
+++ b/lang/python/examples/signverify.py
@@ -19,6 +19,9 @@
 # Sample of unattended signing/verifying of a message.
 # It uses keys for joe+pyme at example.org generated by genkey.py script
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import os
 import pyme
diff --git a/lang/python/examples/simple.py b/lang/python/examples/simple.py
index ca72cf1..ccd7cb4 100755
--- a/lang/python/examples/simple.py
+++ b/lang/python/examples/simple.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import os
 import pyme
diff --git a/lang/python/examples/testCMSgetkey.py b/lang/python/examples/testCMSgetkey.py
index fbaa042..4467b6c 100644
--- a/lang/python/examples/testCMSgetkey.py
+++ b/lang/python/examples/testCMSgetkey.py
@@ -18,6 +18,9 @@
 
 """A test applicaton for the CMS protocol."""
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import pyme
 
diff --git a/lang/python/examples/verifydetails.py b/lang/python/examples/verifydetails.py
index 1cd538c..63f40c1 100755
--- a/lang/python/examples/verifydetails.py
+++ b/lang/python/examples/verifydetails.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import os
 from pyme import core
diff --git a/lang/python/gpgme-h-clean.py b/lang/python/gpgme-h-clean.py
index ce368f0..0ec7ab5 100755
--- a/lang/python/gpgme-h-clean.py
+++ b/lang/python/gpgme-h-clean.py
@@ -17,6 +17,9 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys, re
 
 if len(sys.argv) != 2:
diff --git a/lang/python/pyme/__init__.py b/lang/python/pyme/__init__.py
index f9e12d0..12c96c2 100644
--- a/lang/python/pyme/__init__.py
+++ b/lang/python/pyme/__init__.py
@@ -99,6 +99,9 @@ GPGME documentation: https://www.gnupg.org/documentation/manuals/gpgme/
 
 """
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from . import core
 from . import errors
 from . import constants
diff --git a/lang/python/pyme/callbacks.py b/lang/python/pyme/callbacks.py
index 09f8226..b25a9a7 100644
--- a/lang/python/pyme/callbacks.py
+++ b/lang/python/pyme/callbacks.py
@@ -15,6 +15,9 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from getpass import getpass
 
 def passphrase_stdin(hint, desc, prev_bad, hook=None):
diff --git a/lang/python/pyme/constants/__init__.py b/lang/python/pyme/constants/__init__.py
index 2e91d76..96465de 100644
--- a/lang/python/pyme/constants/__init__.py
+++ b/lang/python/pyme/constants/__init__.py
@@ -1,4 +1,7 @@
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import util
 util.process_constants('GPGME_', globals())
 
diff --git a/lang/python/pyme/constants/data/__init__.py b/lang/python/pyme/constants/data/__init__.py
index ed7b67b..8274ab9 100644
--- a/lang/python/pyme/constants/data/__init__.py
+++ b/lang/python/pyme/constants/data/__init__.py
@@ -1,3 +1,6 @@
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from . import encoding
 __all__ = ['encoding']
diff --git a/lang/python/pyme/constants/data/encoding.py b/lang/python/pyme/constants/data/encoding.py
index ac6079c..a05dbb4 100644
--- a/lang/python/pyme/constants/data/encoding.py
+++ b/lang/python/pyme/constants/data/encoding.py
@@ -15,5 +15,8 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import util
 util.process_constants('GPGME_DATA_ENCODING_', globals())
diff --git a/lang/python/pyme/constants/event.py b/lang/python/pyme/constants/event.py
index 3ce234e..2e30c5e 100644
--- a/lang/python/pyme/constants/event.py
+++ b/lang/python/pyme/constants/event.py
@@ -15,5 +15,8 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import util
 util.process_constants('GPGME_EVENT_', globals())
diff --git a/lang/python/pyme/constants/import.py b/lang/python/pyme/constants/import.py
index a824f7b..10e7d3c 100644
--- a/lang/python/pyme/constants/import.py
+++ b/lang/python/pyme/constants/import.py
@@ -15,5 +15,8 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import util
 util.process_constants('GPGME_IMPORT_', globals())
diff --git a/lang/python/pyme/constants/keylist/__init__.py b/lang/python/pyme/constants/keylist/__init__.py
index 8752bb2..2ce0edf 100644
--- a/lang/python/pyme/constants/keylist/__init__.py
+++ b/lang/python/pyme/constants/keylist/__init__.py
@@ -1,3 +1,6 @@
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from . import mode
 __all__ = ['mode']
diff --git a/lang/python/pyme/constants/keylist/mode.py b/lang/python/pyme/constants/keylist/mode.py
index 7c3cd09..000dd79 100644
--- a/lang/python/pyme/constants/keylist/mode.py
+++ b/lang/python/pyme/constants/keylist/mode.py
@@ -15,5 +15,8 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import util
 util.process_constants('GPGME_KEYLIST_MODE_', globals())
diff --git a/lang/python/pyme/constants/md.py b/lang/python/pyme/constants/md.py
index 700d872..dbd762c 100644
--- a/lang/python/pyme/constants/md.py
+++ b/lang/python/pyme/constants/md.py
@@ -15,5 +15,8 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import util
 util.process_constants('GPGME_MD_', globals())
diff --git a/lang/python/pyme/constants/pk.py b/lang/python/pyme/constants/pk.py
index f0e3937..cfc5309 100644
--- a/lang/python/pyme/constants/pk.py
+++ b/lang/python/pyme/constants/pk.py
@@ -15,5 +15,8 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import util
 util.process_constants('GPGME_PK_', globals())
diff --git a/lang/python/pyme/constants/protocol.py b/lang/python/pyme/constants/protocol.py
index e9f9a48..a4b6583 100644
--- a/lang/python/pyme/constants/protocol.py
+++ b/lang/python/pyme/constants/protocol.py
@@ -15,5 +15,8 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import util
 util.process_constants('GPGME_PROTOCOL_', globals())
diff --git a/lang/python/pyme/constants/sig/__init__.py b/lang/python/pyme/constants/sig/__init__.py
index 8752bb2..2ce0edf 100644
--- a/lang/python/pyme/constants/sig/__init__.py
+++ b/lang/python/pyme/constants/sig/__init__.py
@@ -1,3 +1,6 @@
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from . import mode
 __all__ = ['mode']
diff --git a/lang/python/pyme/constants/sig/mode.py b/lang/python/pyme/constants/sig/mode.py
index 631bd7c..fb534bc 100644
--- a/lang/python/pyme/constants/sig/mode.py
+++ b/lang/python/pyme/constants/sig/mode.py
@@ -15,5 +15,8 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import util
 util.process_constants('GPGME_SIG_MODE_', globals())
diff --git a/lang/python/pyme/constants/sigsum.py b/lang/python/pyme/constants/sigsum.py
index 5164347..3d94745 100644
--- a/lang/python/pyme/constants/sigsum.py
+++ b/lang/python/pyme/constants/sigsum.py
@@ -15,5 +15,8 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import util
 util.process_constants('GPGME_SIGSUM_', globals())
diff --git a/lang/python/pyme/constants/status.py b/lang/python/pyme/constants/status.py
index c1859b2..ee52259 100644
--- a/lang/python/pyme/constants/status.py
+++ b/lang/python/pyme/constants/status.py
@@ -15,5 +15,8 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import util
 util.process_constants('GPGME_STATUS_', globals())
diff --git a/lang/python/pyme/constants/validity.py b/lang/python/pyme/constants/validity.py
index fde2eee..4ecd4d3 100644
--- a/lang/python/pyme/constants/validity.py
+++ b/lang/python/pyme/constants/validity.py
@@ -15,5 +15,8 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import util
 util.process_constants('GPGME_VALIDITY_', globals())
diff --git a/lang/python/pyme/core.py b/lang/python/pyme/core.py
index a71426b..55e8687 100644
--- a/lang/python/pyme/core.py
+++ b/lang/python/pyme/core.py
@@ -24,6 +24,9 @@ and the 'Data' class describing buffers of data.
 
 """
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import re
 import os
 import weakref
diff --git a/lang/python/pyme/errors.py b/lang/python/pyme/errors.py
index 9c58207..e26c747 100644
--- a/lang/python/pyme/errors.py
+++ b/lang/python/pyme/errors.py
@@ -15,6 +15,9 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from . import gpgme
 from . import util
 
diff --git a/lang/python/pyme/results.py b/lang/python/pyme/results.py
index 374d982..bfc26cc 100644
--- a/lang/python/pyme/results.py
+++ b/lang/python/pyme/results.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 """Robust result objects
 
 Results returned by the underlying library are fragile, i.e. they are
diff --git a/lang/python/pyme/util.py b/lang/python/pyme/util.py
index bf25ccb..e4fca4c 100644
--- a/lang/python/pyme/util.py
+++ b/lang/python/pyme/util.py
@@ -16,6 +16,9 @@
 #    License along with this library; if not, write to the Free Software
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 
 def process_constants(prefix, scope):
diff --git a/lang/python/pyme/version.py.in b/lang/python/pyme/version.py.in
index e4a5a27..5fd9ce2 100644
--- a/lang/python/pyme/version.py.in
+++ b/lang/python/pyme/version.py.in
@@ -16,6 +16,9 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
+from __future__ import absolute_import, print_function
+del absolute_import, print_function
+
 from . import gpgme
 
 productname = 'pyme'
diff --git a/lang/python/tests/final.py b/lang/python/tests/final.py
index 15010af..8e7ab33 100755
--- a/lang/python/tests/final.py
+++ b/lang/python/tests/final.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import os
 import subprocess
 
diff --git a/lang/python/tests/initial.py b/lang/python/tests/initial.py
index 7adaa91..2d4827a 100755
--- a/lang/python/tests/initial.py
+++ b/lang/python/tests/initial.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import os
 import subprocess
 import pyme
diff --git a/lang/python/tests/support.py b/lang/python/tests/support.py
index f42fc2e..4d7135e 100644
--- a/lang/python/tests/support.py
+++ b/lang/python/tests/support.py
@@ -15,6 +15,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import os
 from pyme import core
diff --git a/lang/python/tests/t-callbacks.py b/lang/python/tests/t-callbacks.py
index fc58683..b3b4349 100755
--- a/lang/python/tests/t-callbacks.py
+++ b/lang/python/tests/t-callbacks.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import os
 from pyme import core, constants
 import support
diff --git a/lang/python/tests/t-data.py b/lang/python/tests/t-data.py
index 6e05d13..4812a2e 100755
--- a/lang/python/tests/t-data.py
+++ b/lang/python/tests/t-data.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import io
 import os
 import tempfile
diff --git a/lang/python/tests/t-decrypt-verify.py b/lang/python/tests/t-decrypt-verify.py
index 6518d79..a38a965 100755
--- a/lang/python/tests/t-decrypt-verify.py
+++ b/lang/python/tests/t-decrypt-verify.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import pyme
 from pyme import core, constants, errors
 import support
diff --git a/lang/python/tests/t-decrypt.py b/lang/python/tests/t-decrypt.py
index 3b0c484..2d85bc2 100755
--- a/lang/python/tests/t-decrypt.py
+++ b/lang/python/tests/t-decrypt.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import pyme
 from pyme import core, constants
 import support
diff --git a/lang/python/tests/t-edit.py b/lang/python/tests/t-edit.py
index 8bebe67..9ba187d 100755
--- a/lang/python/tests/t-edit.py
+++ b/lang/python/tests/t-edit.py
@@ -18,6 +18,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import os
 from pyme import core, constants
diff --git a/lang/python/tests/t-encrypt-large.py b/lang/python/tests/t-encrypt-large.py
index d5b9dc9..b9cc3b5 100755
--- a/lang/python/tests/t-encrypt-large.py
+++ b/lang/python/tests/t-encrypt-large.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import random
 from pyme import core, constants
diff --git a/lang/python/tests/t-encrypt-sign.py b/lang/python/tests/t-encrypt-sign.py
index 8c4b5d9..a453f79 100755
--- a/lang/python/tests/t-encrypt-sign.py
+++ b/lang/python/tests/t-encrypt-sign.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import pyme
 from pyme import core, constants
diff --git a/lang/python/tests/t-encrypt-sym.py b/lang/python/tests/t-encrypt-sym.py
index c279d6a..d577184 100755
--- a/lang/python/tests/t-encrypt-sym.py
+++ b/lang/python/tests/t-encrypt-sym.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import os
 import pyme
 from pyme import core, constants
diff --git a/lang/python/tests/t-encrypt.py b/lang/python/tests/t-encrypt.py
index 456f2c1..65e7d24 100755
--- a/lang/python/tests/t-encrypt.py
+++ b/lang/python/tests/t-encrypt.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import pyme
 from pyme import core, constants
 import support
diff --git a/lang/python/tests/t-export.py b/lang/python/tests/t-export.py
index f8d02f2..db36b98 100755
--- a/lang/python/tests/t-export.py
+++ b/lang/python/tests/t-export.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import core, constants
 import support
 
diff --git a/lang/python/tests/t-file-name.py b/lang/python/tests/t-file-name.py
index 09eb1f9..e93b120 100755
--- a/lang/python/tests/t-file-name.py
+++ b/lang/python/tests/t-file-name.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import os
 from pyme import core, constants
 import support
diff --git a/lang/python/tests/t-idiomatic.py b/lang/python/tests/t-idiomatic.py
index 6dbe620..f063206 100755
--- a/lang/python/tests/t-idiomatic.py
+++ b/lang/python/tests/t-idiomatic.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import io
 import os
diff --git a/lang/python/tests/t-import.py b/lang/python/tests/t-import.py
index b267fc8..0b50d02 100755
--- a/lang/python/tests/t-import.py
+++ b/lang/python/tests/t-import.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import core, constants
 import support
 
diff --git a/lang/python/tests/t-keylist.py b/lang/python/tests/t-keylist.py
index 7b7bbae..5e8b333 100755
--- a/lang/python/tests/t-keylist.py
+++ b/lang/python/tests/t-keylist.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import core, constants
 import support
 
diff --git a/lang/python/tests/t-protocol-assuan.py b/lang/python/tests/t-protocol-assuan.py
index a86146b..172c7d0 100755
--- a/lang/python/tests/t-protocol-assuan.py
+++ b/lang/python/tests/t-protocol-assuan.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import pyme
 
 with pyme.Context(protocol=pyme.constants.PROTOCOL_ASSUAN) as c:
diff --git a/lang/python/tests/t-sig-notation.py b/lang/python/tests/t-sig-notation.py
index c523006..777bc0b 100755
--- a/lang/python/tests/t-sig-notation.py
+++ b/lang/python/tests/t-sig-notation.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import os
 from pyme import core, constants
 import support
diff --git a/lang/python/tests/t-sign.py b/lang/python/tests/t-sign.py
index 5f26ff3..b0e211a 100755
--- a/lang/python/tests/t-sign.py
+++ b/lang/python/tests/t-sign.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import os
 import pyme
 from pyme import core, constants
diff --git a/lang/python/tests/t-signers.py b/lang/python/tests/t-signers.py
index 7b064c9..11403af 100755
--- a/lang/python/tests/t-signers.py
+++ b/lang/python/tests/t-signers.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import pyme
 from pyme import core, constants
 import support
diff --git a/lang/python/tests/t-trustlist.py b/lang/python/tests/t-trustlist.py
index a33e35e..4253bd7 100755
--- a/lang/python/tests/t-trustlist.py
+++ b/lang/python/tests/t-trustlist.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 from pyme import core, constants
 import support
 
diff --git a/lang/python/tests/t-verify.py b/lang/python/tests/t-verify.py
index 25c8c0c..39f6176 100755
--- a/lang/python/tests/t-verify.py
+++ b/lang/python/tests/t-verify.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import sys
 import os
 import pyme
diff --git a/lang/python/tests/t-wait.py b/lang/python/tests/t-wait.py
index 9f3a7ed..b7d9a34 100755
--- a/lang/python/tests/t-wait.py
+++ b/lang/python/tests/t-wait.py
@@ -17,6 +17,9 @@
 # You should have received a copy of the GNU Lesser General Public
 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
 
+from __future__ import absolute_import, print_function, unicode_literals
+del absolute_import, print_function, unicode_literals
+
 import time
 from pyme import core, constants, errors
 import support

commit 3b37c4efcf68657a856dbce60c0bd0fc78dd0770
Author: Justus Winter <justus at g10code.com>
Date:   Wed Sep 14 10:51:49 2016 +0200

    python: Use more generic shebang.
    
    --
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/lang/python/examples/assuan.py b/lang/python/examples/assuan.py
index 82b1e1d..e4822b7 100644
--- a/lang/python/examples/assuan.py
+++ b/lang/python/examples/assuan.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 #
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/examples/decryption-filter.py b/lang/python/examples/decryption-filter.py
index 1647ca3..dbd66fc 100644
--- a/lang/python/examples/decryption-filter.py
+++ b/lang/python/examples/decryption-filter.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 #
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/examples/delkey.py b/lang/python/examples/delkey.py
index e607f21..491f38a 100755
--- a/lang/python/examples/delkey.py
+++ b/lang/python/examples/delkey.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 #
 # Copyright (C) 2016 g10 Code GmbH
 # Copyright (C) 2004,2008 Igor Belyi <belyi at users.sourceforge.net>
diff --git a/lang/python/examples/encrypt-to-all.py b/lang/python/examples/encrypt-to-all.py
index 4586f93..304b474 100755
--- a/lang/python/examples/encrypt-to-all.py
+++ b/lang/python/examples/encrypt-to-all.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 #
 # Copyright (C) 2016 g10 Code GmbH
 # Copyright (C) 2008 Igor Belyi <belyi at users.sourceforge.net>
diff --git a/lang/python/examples/exportimport.py b/lang/python/examples/exportimport.py
index 39b1595..8d76fa1 100755
--- a/lang/python/examples/exportimport.py
+++ b/lang/python/examples/exportimport.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 #
 # Copyright (C) 2016 g10 Code GmbH
 # Copyright (C) 2004,2008 Igor Belyi <belyi at users.sourceforge.net>
diff --git a/lang/python/examples/genkey.py b/lang/python/examples/genkey.py
index 66e382b..972fed7 100755
--- a/lang/python/examples/genkey.py
+++ b/lang/python/examples/genkey.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 #
 # Copyright (C) 2016 g10 Code GmbH
 # Copyright (C) 2004 Igor Belyi <belyi at users.sourceforge.net>
diff --git a/lang/python/examples/inter-edit.py b/lang/python/examples/inter-edit.py
index 8199cc6..2f8e4ef 100644
--- a/lang/python/examples/inter-edit.py
+++ b/lang/python/examples/inter-edit.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 #
 # Copyright (C) 2016 g10 Code GmbH
 # Copyright (C) 2005 Igor Belyi <belyi at users.sourceforge.net>
diff --git a/lang/python/examples/sign.py b/lang/python/examples/sign.py
index 0dd6a7c..d376683 100755
--- a/lang/python/examples/sign.py
+++ b/lang/python/examples/sign.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 #
 # Copyright (C) 2016 g10 Code GmbH
 # Copyright (C) 2002 John Goerzen <jgoerzen at complete.org>
diff --git a/lang/python/examples/signverify.py b/lang/python/examples/signverify.py
index 7a24d71..e7bf0c9 100755
--- a/lang/python/examples/signverify.py
+++ b/lang/python/examples/signverify.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 #
 # Copyright (C) 2016 g10 Code GmbH
 # Copyright (C) 2004,2008 Igor Belyi <belyi at users.sourceforge.net>
diff --git a/lang/python/examples/simple.py b/lang/python/examples/simple.py
index 50a3938..ca72cf1 100755
--- a/lang/python/examples/simple.py
+++ b/lang/python/examples/simple.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 #
 # Copyright (C) 2016 g10 Code GmbH
 # Copyright (C) 2005 Igor Belyi <belyi at users.sourceforge.net>
diff --git a/lang/python/examples/testCMSgetkey.py b/lang/python/examples/testCMSgetkey.py
index 7c642e6..fbaa042 100644
--- a/lang/python/examples/testCMSgetkey.py
+++ b/lang/python/examples/testCMSgetkey.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 #
 # Copyright (C) 2016 g10 Code GmbH
 # Copyright (C) 2008 Bernhard Reiter <bernhard at intevation.de>
diff --git a/lang/python/examples/verifydetails.py b/lang/python/examples/verifydetails.py
index b57ed84..1cd538c 100755
--- a/lang/python/examples/verifydetails.py
+++ b/lang/python/examples/verifydetails.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 #
 # Copyright (C) 2016 g10 Code GmbH
 # Copyright (C) 2004,2008 Igor Belyi <belyi at users.sourceforge.net>
diff --git a/lang/python/gpgme-h-clean.py b/lang/python/gpgme-h-clean.py
index b29b2e1..ce368f0 100755
--- a/lang/python/gpgme-h-clean.py
+++ b/lang/python/gpgme-h-clean.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 # Copyright (C) 2004,2008 Igor Belyi <belyi at users.sourceforge.net>
diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
index 22035cb..a9c7691 100755
--- a/lang/python/setup.py.in
+++ b/lang/python/setup.py.in
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 # Copyright (C) 2004 Igor Belyi <belyi at users.sourceforge.net>
diff --git a/lang/python/tests/final.py b/lang/python/tests/final.py
index f75c200..15010af 100755
--- a/lang/python/tests/final.py
+++ b/lang/python/tests/final.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/initial.py b/lang/python/tests/initial.py
index 169c3df..7adaa91 100755
--- a/lang/python/tests/initial.py
+++ b/lang/python/tests/initial.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-callbacks.py b/lang/python/tests/t-callbacks.py
index 3219463..fc58683 100755
--- a/lang/python/tests/t-callbacks.py
+++ b/lang/python/tests/t-callbacks.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-data.py b/lang/python/tests/t-data.py
index 3774f09..6e05d13 100755
--- a/lang/python/tests/t-data.py
+++ b/lang/python/tests/t-data.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-decrypt-verify.py b/lang/python/tests/t-decrypt-verify.py
index 0f615dc..6518d79 100755
--- a/lang/python/tests/t-decrypt-verify.py
+++ b/lang/python/tests/t-decrypt-verify.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-decrypt.py b/lang/python/tests/t-decrypt.py
index b5c4700..3b0c484 100755
--- a/lang/python/tests/t-decrypt.py
+++ b/lang/python/tests/t-decrypt.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-edit.py b/lang/python/tests/t-edit.py
index 64255c9..8bebe67 100755
--- a/lang/python/tests/t-edit.py
+++ b/lang/python/tests/t-edit.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2005 Igor Belyi <belyi at users.sourceforge.net>
 # Copyright (C) 2016 g10 Code GmbH
diff --git a/lang/python/tests/t-encrypt-large.py b/lang/python/tests/t-encrypt-large.py
index 29f9de2..d5b9dc9 100755
--- a/lang/python/tests/t-encrypt-large.py
+++ b/lang/python/tests/t-encrypt-large.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-encrypt-sign.py b/lang/python/tests/t-encrypt-sign.py
index 31cc94f..8c4b5d9 100755
--- a/lang/python/tests/t-encrypt-sign.py
+++ b/lang/python/tests/t-encrypt-sign.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-encrypt-sym.py b/lang/python/tests/t-encrypt-sym.py
index c5be183..c279d6a 100755
--- a/lang/python/tests/t-encrypt-sym.py
+++ b/lang/python/tests/t-encrypt-sym.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-encrypt.py b/lang/python/tests/t-encrypt.py
index 4c77f39..456f2c1 100755
--- a/lang/python/tests/t-encrypt.py
+++ b/lang/python/tests/t-encrypt.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-export.py b/lang/python/tests/t-export.py
index a102425..f8d02f2 100755
--- a/lang/python/tests/t-export.py
+++ b/lang/python/tests/t-export.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-file-name.py b/lang/python/tests/t-file-name.py
index 6f9294e..09eb1f9 100755
--- a/lang/python/tests/t-file-name.py
+++ b/lang/python/tests/t-file-name.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-idiomatic.py b/lang/python/tests/t-idiomatic.py
index 726bbb9..6dbe620 100755
--- a/lang/python/tests/t-idiomatic.py
+++ b/lang/python/tests/t-idiomatic.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-import.py b/lang/python/tests/t-import.py
index 03b576b..b267fc8 100755
--- a/lang/python/tests/t-import.py
+++ b/lang/python/tests/t-import.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-keylist.py b/lang/python/tests/t-keylist.py
index 40d9c80..7b7bbae 100755
--- a/lang/python/tests/t-keylist.py
+++ b/lang/python/tests/t-keylist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-protocol-assuan.py b/lang/python/tests/t-protocol-assuan.py
index 30907a1..a86146b 100755
--- a/lang/python/tests/t-protocol-assuan.py
+++ b/lang/python/tests/t-protocol-assuan.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-sig-notation.py b/lang/python/tests/t-sig-notation.py
index b024bb5..c523006 100755
--- a/lang/python/tests/t-sig-notation.py
+++ b/lang/python/tests/t-sig-notation.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-sign.py b/lang/python/tests/t-sign.py
index e066a29..5f26ff3 100755
--- a/lang/python/tests/t-sign.py
+++ b/lang/python/tests/t-sign.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-signers.py b/lang/python/tests/t-signers.py
index 9d2cbdc..7b064c9 100755
--- a/lang/python/tests/t-signers.py
+++ b/lang/python/tests/t-signers.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-trustlist.py b/lang/python/tests/t-trustlist.py
index a24eab8..a33e35e 100755
--- a/lang/python/tests/t-trustlist.py
+++ b/lang/python/tests/t-trustlist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-verify.py b/lang/python/tests/t-verify.py
index ed5a91a..25c8c0c 100755
--- a/lang/python/tests/t-verify.py
+++ b/lang/python/tests/t-verify.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-wait.py b/lang/python/tests/t-wait.py
index 7eaa46a..9f3a7ed 100755
--- a/lang/python/tests/t-wait.py
+++ b/lang/python/tests/t-wait.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #
diff --git a/lang/python/tests/t-wrapper.py b/lang/python/tests/t-wrapper.py
index fab0d81..d260264 100755
--- a/lang/python/tests/t-wrapper.py
+++ b/lang/python/tests/t-wrapper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
 
 # Copyright (C) 2016 g10 Code GmbH
 #

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

Summary of changes:
 NEWS                                           |  2 +-
 configure.ac                                   | 62 +++++++++++++++---
 lang/python/Makefile.am                        | 18 ++++--
 lang/python/examples/assuan.py                 |  5 +-
 lang/python/examples/decryption-filter.py      |  5 +-
 lang/python/examples/delkey.py                 |  5 +-
 lang/python/examples/encrypt-to-all.py         |  5 +-
 lang/python/examples/exportimport.py           |  5 +-
 lang/python/examples/genkey.py                 |  5 +-
 lang/python/examples/inter-edit.py             |  5 +-
 lang/python/examples/sign.py                   |  5 +-
 lang/python/examples/signverify.py             |  5 +-
 lang/python/examples/simple.py                 |  5 +-
 lang/python/examples/testCMSgetkey.py          |  5 +-
 lang/python/examples/verifydetails.py          |  5 +-
 lang/python/gpgme-h-clean.py                   |  5 +-
 lang/python/pyme/__init__.py                   |  3 +
 lang/python/pyme/callbacks.py                  |  3 +
 lang/python/pyme/constants/__init__.py         |  3 +
 lang/python/pyme/constants/data/__init__.py    |  3 +
 lang/python/pyme/constants/data/encoding.py    |  3 +
 lang/python/pyme/constants/event.py            |  3 +
 lang/python/pyme/constants/import.py           |  3 +
 lang/python/pyme/constants/keylist/__init__.py |  3 +
 lang/python/pyme/constants/keylist/mode.py     |  3 +
 lang/python/pyme/constants/md.py               |  3 +
 lang/python/pyme/constants/pk.py               |  3 +
 lang/python/pyme/constants/protocol.py         |  3 +
 lang/python/pyme/constants/sig/__init__.py     |  3 +
 lang/python/pyme/constants/sig/mode.py         |  3 +
 lang/python/pyme/constants/sigsum.py           |  3 +
 lang/python/pyme/constants/status.py           |  3 +
 lang/python/pyme/constants/validity.py         |  3 +
 lang/python/pyme/core.py                       |  3 +
 lang/python/pyme/errors.py                     |  3 +
 lang/python/pyme/results.py                    |  3 +
 lang/python/pyme/util.py                       |  3 +
 lang/python/pyme/version.py.in                 |  3 +
 lang/python/setup.py.in                        |  2 +-
 lang/python/tests/Makefile.am                  | 23 +++++--
 lang/python/tests/final.py                     |  5 +-
 lang/python/tests/initial.py                   |  5 +-
 lang/python/tests/run-tests.py                 | 90 ++++++++++++++++++++++++++
 lang/python/tests/support.py                   |  3 +
 lang/python/tests/t-callbacks.py               |  5 +-
 lang/python/tests/t-data.py                    |  5 +-
 lang/python/tests/t-decrypt-verify.py          |  5 +-
 lang/python/tests/t-decrypt.py                 |  5 +-
 lang/python/tests/t-edit.py                    |  5 +-
 lang/python/tests/t-encrypt-large.py           |  5 +-
 lang/python/tests/t-encrypt-sign.py            |  5 +-
 lang/python/tests/t-encrypt-sym.py             |  5 +-
 lang/python/tests/t-encrypt.py                 |  5 +-
 lang/python/tests/t-export.py                  |  5 +-
 lang/python/tests/t-file-name.py               |  5 +-
 lang/python/tests/t-idiomatic.py               |  5 +-
 lang/python/tests/t-import.py                  |  5 +-
 lang/python/tests/t-keylist.py                 |  5 +-
 lang/python/tests/t-protocol-assuan.py         |  5 +-
 lang/python/tests/t-sig-notation.py            |  5 +-
 lang/python/tests/t-sign.py                    |  5 +-
 lang/python/tests/t-signers.py                 |  5 +-
 lang/python/tests/t-trustlist.py               |  5 +-
 lang/python/tests/t-verify.py                  |  5 +-
 lang/python/tests/t-wait.py                    |  5 +-
 lang/python/tests/t-wrapper.py                 |  2 +-
 66 files changed, 392 insertions(+), 56 deletions(-)
 create mode 100644 lang/python/tests/run-tests.py


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




More information about the Gnupg-commits mailing list