[git] GPGME - branch, master, updated. gpgme-1.9.0-23-g63bec9f

by Justus Winter cvs at cvs.gnupg.org
Mon Apr 10 15:45:45 CEST 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  63bec9f48666d811b65e2ef5cc63f8b731249088 (commit)
       via  db476e923415f8e458720aaafde7234b802a33ab (commit)
       via  3cc90b67fa970e716c8672ec5c5f591fa11ab216 (commit)
       via  7309ce6f5f7c86570953a141965d4f54cd9ad9a0 (commit)
       via  df8433bffa9e669897243f08edf7845762250e4a (commit)
       via  25e6444b3f4601c7821beab06bc4520deacb007b (commit)
       via  ebefc6cbf937d14ced65f7ded79c4ba901507d23 (commit)
       via  365c649ad073f2697438dc014160943ae31a1447 (commit)
      from  49195c487e6c923f7137f092b982e7d833d98de6 (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 63bec9f48666d811b65e2ef5cc63f8b731249088
Author: Justus Winter <justus at g10code.com>
Date:   Mon Apr 10 15:24:03 2017 +0200

    python: Prune CLEANFILES.
    
    --
    Fixes-commit: e7d9c0c3d773f826dbd2ed417d04e25c410f3374
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
index 8f80a6b..3fa98b5 100644
--- a/lang/python/Makefile.am
+++ b/lang/python/Makefile.am
@@ -65,9 +65,7 @@ upload: python$(PYTHON_VERSION)-gpg-dist/gpg-$(VERSION).tar.gz \
 CLEANFILES = copystamp \
 	config.h \
 	data.h \
-	gpg \
-	files.txt \
-	install_files.txt
+	gpg
 
 # Remove the rest.
 #

commit db476e923415f8e458720aaafde7234b802a33ab
Author: Justus Winter <justus at g10code.com>
Date:   Mon Apr 10 15:20:34 2017 +0200

    python: Fix distcheck.
    
    * lang/python/Makefile.am (uninstall-local): Explicitly request the
    scheme 'posix_prefix'.  On Python2.7 the default scheme is
    'posix_local', breaking distcheck.
    
    Fixes-commit: 25e6444b3f4601c7821beab06bc4520deacb007b
    Signed-off-by: Justus Winter <justus at g10code.com>

diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
index 90075f7..8f80a6b 100644
--- a/lang/python/Makefile.am
+++ b/lang/python/Makefile.am
@@ -93,8 +93,8 @@ install-exec-local:
 	done
 
 uninstall-local:
-	GV=$$(echo $(VERSION) | tr - _); for PYTHON in $(PYTHONS); do \
-	  PLATLIB="$(prefix)/$$("$${PYTHON}" -c 'import sysconfig, os; print(os.path.relpath(sysconfig.get_path("platlib"), sysconfig.get_config_var("prefix")))')" ; \
+	set -x; GV=$$(echo $(VERSION) | tr - _); for PYTHON in $(PYTHONS); do \
+	  PLATLIB="$(prefix)/$$("$${PYTHON}" -c 'import sysconfig, os; print(os.path.relpath(sysconfig.get_path("platlib", scheme="posix_prefix"), sysconfig.get_config_var("prefix")))')" ; \
 	  rm -rf -- "$(DESTDIR)$${PLATLIB}/gpg" \
 		"$(DESTDIR)$${PLATLIB}"/gpg-$$GV-py*.egg-info ; \
 	done

commit 3cc90b67fa970e716c8672ec5c5f591fa11ab216
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date:   Sat Apr 8 16:34:33 2017 +0300

    python: Support alternatate libdir for tests
    
    * lang/python/tests/run-tests.py: Add --python-libdir optional
    parameter.
    
    --
    
    This will make the python tests usable for downstream that build python
    module outside of autotools build system.
    
    Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>

diff --git a/lang/python/tests/run-tests.py b/lang/python/tests/run-tests.py
index f236712..78a0ec2 100644
--- a/lang/python/tests/run-tests.py
+++ b/lang/python/tests/run-tests.py
@@ -51,6 +51,9 @@ parser.add_argument('--srcdir', type=str,
 parser.add_argument('--builddir', type=str,
                     default=os.environ.get("abs_builddir", ""),
                     help='Location of the tests.')
+parser.add_argument('--python-libdir', type=str,
+                    default=None,
+                    help='Optional location of the in-tree module lib directory.')
 parser.add_argument('--parallel', action="store_true", default=False,
                     help='Ignored.  For compatibility with run-tests.scm.')
 
@@ -69,18 +72,20 @@ 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()
 
-    pattern = os.path.join(args.builddir, "..",
-                           "{0}-gpg".format(os.path.basename(interpreter)),
-                           "lib*")
-    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))
+    if not args.python_libdir:
+        pattern = os.path.join(args.builddir, "..",
+                               "{0}-gpg".format(os.path.basename(interpreter)),
+                               "lib*")
+        libdirs = glob.glob(pattern)
+        if len(libdirs) == 0:
+            sys.exit("Build directory matching {0!r} not found.".format(pattern))
+        elif len(libdirs) > 1:
+            sys.exit("Multiple build directories matching {0!r} found: {1}".format(
+                pattern, libdirs))
+        python_libdir = libdirs[0]
 
     env = dict(os.environ)
-    env["PYTHONPATH"] = builddirs[0]
+    env["PYTHONPATH"] = python_libdir
 
     if not args.quiet:
         print("Running tests using {0} ({1})...".format(interpreter, version))

commit 7309ce6f5f7c86570953a141965d4f54cd9ad9a0
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date:   Sat Apr 8 16:34:32 2017 +0300

    python: Read gpg-error.h using the pre-processor
    
    * lang/python/setup.py.in: Read gpg-error.h using the pre-processor.
    
    --
    
    The libgpg-error may be installed in multilib configuration in which
    there is a wrapper header at /usr/include that includes the actual
    header at /usr/include/*. This causes invalid errors.i generation.
    
    Let the pre-processor extract the header content instead reading it
    explicitly.
    
    Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>

diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
index f4ce64f..a1279f8 100755
--- a/lang/python/setup.py.in
+++ b/lang/python/setup.py.in
@@ -55,13 +55,6 @@ else:
     devnull = open(os.devnull, "w")
 
 try:
-    subprocess.check_call(gpg_error_config + ['--version'],
-                          stdout=devnull)
-except:
-    sys.exit("Could not find gpg-error-config.  " +
-             "Please install the libgpg-error development package.")
-
-try:
     subprocess.check_call(gpgme_config + ['--version'],
                           stdout=devnull)
 except:
@@ -84,13 +77,6 @@ if not (major > 1 or (major == 1 and minor >= 7)):
 if not gpgme_h:
     gpgme_h = os.path.join(getconfig("prefix")[0], "include", "gpgme.h")
 
-gpg_error_prefix = getconfig("prefix", config=gpg_error_config)[0]
-gpg_error_h = os.path.join(gpg_error_prefix, "include", "gpg-error.h")
-if not os.path.exists(gpg_error_h):
-    gpg_error_h = \
-        glob.glob(os.path.join(gpg_error_prefix, "include",
-                               "*", "gpg-error.h"))[0]
-
 define_macros = []
 libs = getconfig('libs')
 
@@ -150,10 +136,27 @@ def up_to_date(source, target):
 from distutils.command.build import build
 class BuildExtFirstHack(build):
 
+    def _read_header(self, header, cflags):
+        tmp_include = self._in_build_base("include1.h")
+        with open(tmp_include, 'w') as f:
+            f.write("#include <%s>" % header)
+        return subprocess.check_output(os.environ.get('CPP', 'cc -E').split() + cflags + [tmp_include]).decode('utf-8')
+
+    def _write_if_unchanged(self, target, content):
+        if os.path.exists(target):
+            with open(target) as f:
+                if f.read() == content:
+                    return
+
+        with open(target, "w") as sink:
+            sink.write(content)
+
     def _generate_gpgme_h(self, source_name, sink_name):
         if up_to_date(source_name, sink_name):
             return
 
+        print("Using gpgme.h from {}".format(source_name))
+
         deprec_func = re.compile(r'^(.*typedef.*|.*\(.*\)|[^#]+\s+.+)'
                                  + r'\s*_GPGME_DEPRECATED(_OUTSIDE_GPGME)?\(.*\);\s*',
                                  re.S)
@@ -169,31 +172,38 @@ class BuildExtFirstHack(build):
                     text = ''
             sink.write(text)
 
-    def _generate_errors_i(self, source_name, sink_name):
-        if up_to_date(source_name, sink_name):
-            return
+    def _generate_errors_i(self):
+
+        try:
+            subprocess.check_call(gpg_error_config + ['--version'],
+                                  stdout=devnull)
+        except:
+            sys.exit("Could not find gpg-error-config.  " +
+                     "Please install the libgpg-error development package.")
+
+        gpg_error_content = self._read_header("gpg-error.h", getconfig("cflags", config=gpg_error_config))
 
         filter_re = re.compile(r'GPG_ERR_[^ ]* =')
         rewrite_re = re.compile(r' *(.*) = .*')
 
-        with open(sink_name, "w") as sink, open(source_name) as source:
-            for line in source:
-                if not filter_re.search(line):
-                    continue
-                sink.write(rewrite_re.sub(r'%constant long \1 = \1;'+'\n', line.strip()))
+        errors_i_content = ''
+        for line in gpg_error_content.splitlines():
+            if not filter_re.search(line):
+                continue
+            errors_i_content += rewrite_re.sub(r'%constant long \1 = \1;'+'\n', line.strip())
+
+        self._write_if_unchanged(self._in_build_base("errors.i"), errors_i_content)
 
     def _in_build_base(self, name):
         return os.path.join(self.build_base, name)
 
     def _generate(self):
-        print("Building python gpg module using {} and {}.".format(gpgme_h, gpg_error_h))
-
         # Cleanup gpgme.h from deprecated functions and typedefs.
         if not os.path.exists(self.build_base):
             os.makedirs(self.build_base)
 
         self._generate_gpgme_h(gpgme_h, self._in_build_base("gpgme.h"))
-        self._generate_errors_i(gpg_error_h, self._in_build_base("errors.i"))
+        self._generate_errors_i()
 
         # Copy due to http://bugs.python.org/issue2624
         # Avoid creating in srcdir

commit df8433bffa9e669897243f08edf7845762250e4a
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date:   Sat Apr 8 16:34:31 2017 +0300

    python: Remove unneeded stats copy
    
    * lang/python/setup.py.in: errors.i, gpgme.h are generated and always
    newer than the original.
    
    Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>

diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
index e50971c..f4ce64f 100755
--- a/lang/python/setup.py.in
+++ b/lang/python/setup.py.in
@@ -195,12 +195,6 @@ class BuildExtFirstHack(build):
         self._generate_gpgme_h(gpgme_h, self._in_build_base("gpgme.h"))
         self._generate_errors_i(gpg_error_h, self._in_build_base("errors.i"))
 
-        # Keep timestamp to avoid rebuild
-        for source, target in ((gpgme_h, self._in_build_base("gpgme.h")),
-                               (gpg_error_h, self._in_build_base("errors.i"))):
-            if not up_to_date(source, target):
-                shutil.copystat(source, target)
-
         # Copy due to http://bugs.python.org/issue2624
         # Avoid creating in srcdir
         for source, target in ((in_srcdir(n), self._in_build_base(n))

commit 25e6444b3f4601c7821beab06bc4520deacb007b
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date:   Sat Apr 8 16:34:30 2017 +0300

    python: Remove usage of PYTHON_VERSIONS
    
    * configure.ac: Remove PYTHON_VERSIONS subst.
    * lang/python/Makefile.am: Use basename of python as builddir prefix.
    * lang/python/tests/run-tests.py: Likewise.
    
    --
    
    Two variables needs be at sync PYTHONS and PYTHON_VERSIONS, these may go
    out of sync in some cases, for example in Gentoo where default python is
    3.4 we get:
    
    PYTHON='/usr/bin/python2'
    PYTHONS='/usr/bin/python /usr/bin/python2'
    PYTHON_VERSIONS='2.7 3.4'
    
    We can use the basename of the python interpreter to achieve similar
    effect without having to sync indexes between these two variables.
    
    Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>

diff --git a/configure.ac b/configure.ac
index 9974abb..becd156 100644
--- a/configure.ac
+++ b/configure.ac
@@ -474,7 +474,6 @@ if test "$found_py" = "1" -o "$found_py2" = "1" -o "$found_py3" = "1"; then
 	fi
 
 	AC_SUBST(PYTHONS, $PYTHONS)
-	AC_SUBST(PYTHON_VERSIONS, $PYTHON_VERSIONS)
     fi
 fi
 
diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
index 4ebd214..90075f7 100644
--- a/lang/python/Makefile.am
+++ b/lang/python/Makefile.am
@@ -38,12 +38,11 @@ copystamp:
 	touch $@
 
 all-local: copystamp
-	set -e ; set $(PYTHONS); for VERSION in $(PYTHON_VERSIONS); do \
-	  PYTHON="$$1" ; shift ; \
+	set -e ; for PYTHON in $(PYTHONS); do \
 	  CFLAGS="$(CFLAGS)" \
 	  srcdir="$(srcdir)" \
 	  top_builddir="$(top_builddir)" \
-	    $$PYTHON setup.py build --verbose --build-base=python$${VERSION}-gpg ; \
+	    $$PYTHON setup.py build --verbose --build-base="$$(basename "$${PYTHON}")-gpg" ; \
 	done
 
 python$(PYTHON_VERSION)-gpg/dist/gpg-$(VERSION).tar.gz.asc: copystamp
@@ -76,26 +75,26 @@ CLEANFILES = copystamp \
 # permissions.
 clean-local:
 	rm -rf -- build
-	for VERSION in $(PYTHON_VERSIONS); do \
-	  find python$${VERSION}-gpg* -type d ! -perm -200 -exec chmod u+w {} ';' ; \
-	  rm -rf -- python$${VERSION}-gpg* ; \
+	for PYTHON in $(PYTHONS); do \
+	  find "$$(basename "$${PYTHON}")-gpg" -type d ! -perm -200 -exec chmod u+w {} ';' ; \
+	  rm -rf -- "$$(basename "$${PYTHON}")-gpg" ; \
 	done
 
 install-exec-local:
-	set -e ; set $(PYTHONS); for VERSION in $(PYTHON_VERSIONS); do \
-	  PYTHON="$$1" ; shift ; \
+	set -e ; for PYTHON in $(PYTHONS); do \
 	  srcdir="$(srcdir)" \
 	  top_builddir="$(top_builddir)" \
 	  $$PYTHON setup.py \
 	  build \
-	  --build-base=python$${VERSION}-gpg \
+	  --build-base="$$(basename "$${PYTHON}")-gpg" \
 	  install \
 	  --prefix "$(DESTDIR)$(prefix)" \
 	  --verbose ; \
 	done
 
 uninstall-local:
-	GV=$$(echo $(VERSION) | tr - _); for PV in $(PYTHON_VERSIONS); do \
-	  rm -rf -- "$(DESTDIR)$(prefix)"/lib*/python$$PV/site-packages/gpg \
-"$(DESTDIR)$(prefix)"/lib*/python$$PV/site-packages/gpg-$$GV-py$$PV.egg-info ; \
+	GV=$$(echo $(VERSION) | tr - _); for PYTHON in $(PYTHONS); do \
+	  PLATLIB="$(prefix)/$$("$${PYTHON}" -c 'import sysconfig, os; print(os.path.relpath(sysconfig.get_path("platlib"), sysconfig.get_config_var("prefix")))')" ; \
+	  rm -rf -- "$(DESTDIR)$${PLATLIB}/gpg" \
+		"$(DESTDIR)$${PLATLIB}"/gpg-$$GV-py*.egg-info ; \
 	done
diff --git a/lang/python/tests/run-tests.py b/lang/python/tests/run-tests.py
index 9e2fb78..f236712 100644
--- a/lang/python/tests/run-tests.py
+++ b/lang/python/tests/run-tests.py
@@ -70,8 +70,8 @@ for interpreter in args.interpreters:
         [interpreter, "-c", "import sys; print('{0}.{1}'.format(sys.version_info[0], sys.version_info[1]))"]).strip().decode()
 
     pattern = os.path.join(args.builddir, "..",
-                           "python{0}-gpg".format(version),
-                           "lib*"+version)
+                           "{0}-gpg".format(os.path.basename(interpreter)),
+                           "lib*")
     builddirs = glob.glob(pattern)
     if len(builddirs) == 0:
         sys.exit("Build directory matching {0!r} not found.".format(pattern))

commit ebefc6cbf937d14ced65f7ded79c4ba901507d23
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date:   Fri Apr 7 17:32:18 2017 +0300

    tests: Do not use check-local magic as dependency
    
    * tests/gpg/Makefile.am: Use BUILT_SOURCES instead of check-local
    and initial.test.
    * lang/qt/tests/Makefile.am: Ditto.
    
    --
    
    This fixes "make dist" failure when source tree is clean:
      git clean -dxf
      autoreconf -ivf
      ./configure
      make dist
    
    BUILT_SOURCES should be used when file as generated without explicit
    dependency. The check-local is all-am dependency, this means that it
    will be resolved also in "make dist".
    
    Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>

diff --git a/lang/qt/tests/Makefile.am b/lang/qt/tests/Makefile.am
index 93dce07..fb45eec 100644
--- a/lang/qt/tests/Makefile.am
+++ b/lang/qt/tests/Makefile.am
@@ -43,12 +43,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \
               -I$(top_srcdir)/lang/qt/src \
               -DTOP_SRCDIR="$(top_srcdir)"
 
-check-local: ./pubring-stamp
-
-# To guarantee that check-local is run before any tests we
-# add this dependency:
-initial.test : check-local
-
 support_src = t-support.h t-support.cpp
 
 t_keylist_SOURCES = t-keylist.cpp $(support_src)
@@ -64,7 +58,7 @@ run_keyformailboxjob_SOURCES = run-keyformailboxjob.cpp
 
 nodist_t_keylist_SOURCES = $(moc_files)
 
-BUILT_SOURCES = $(moc_files)
+BUILT_SOURCES = $(moc_files) pubring-stamp
 
 noinst_PROGRAMS = t-keylist t-keylocate t-ownertrust t-tofuinfo t-encrypt \
     run-keyformailboxjob t-wkspublish t-verify t-various t-config
@@ -79,7 +73,7 @@ clean-local:
 
 export GNUPGHOME := $(abs_builddir)
 
-./pubring-stamp: $(top_srcdir)/tests/gpg/pubdemo.asc \
+pubring-stamp: $(top_srcdir)/tests/gpg/pubdemo.asc \
 	             $(top_srcdir)/tests/gpg/secdemo.asc
 	echo "ignore-invalid-option allow-loopback-pinentry" > $(abs_builddir)/gpg-agent.conf
 	echo "allow-loopback-pinentry" >> gpg-agent.conf
@@ -90,7 +84,7 @@ export GNUPGHOME := $(abs_builddir)
 	$(GPG) --no-permission-warning \
 		   --passphrase "abc" \
            --import $(top_srcdir)/tests/gpg/secdemo.asc
-	touch ./pubring-stamp
+	touch pubring-stamp
 
 .cpp.moc:
 	$(MOC) `test -f '$<' || echo '$(srcdir)/'`$< -o $@
diff --git a/tests/gpg/Makefile.am b/tests/gpg/Makefile.am
index 9b74ba6..1d9a6df 100644
--- a/tests/gpg/Makefile.am
+++ b/tests/gpg/Makefile.am
@@ -60,6 +60,8 @@ EXTRA_DIST = initial.test final.test \
         pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \
 	geheim.txt pubkey-1.asc seckey-1.asc pinentry $(private_keys)
 
+BUILT_SOURCES = gpg.conf gpg-agent.conf pubring-stamp \
+           private-keys-v1.d/gpg-sample.stamp
 AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@
 AM_LDFLAGS = -no-install
 LDADD = ../../src/libgpgme.la
@@ -82,13 +84,6 @@ clean-local:
 	-$(top_srcdir)/tests/start-stop-agent --stop
 	-rm -fR private-keys-v1.d
 
-check-local: ./gpg.conf ./gpg-agent.conf ./pubring-stamp \
-           ./private-keys-v1.d/gpg-sample.stamp
-
-# To guarantee that check-local is run before any tests we
-# add this dependency:
-initial.test : check-local
-
 export GNUPGHOME := $(abs_builddir)
 
 export GPG_AGENT_INFO :=

commit 365c649ad073f2697438dc014160943ae31a1447
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date:   Fri Apr 7 17:31:47 2017 +0300

    python: support .pydistutils.cfg mode
    
    * lang/python/setup.py.in: Do not parse arguments.
    
    --
    
    The distutils settings can come from either command-line or
    configuration file. Parsing parameters is not working in all cases.
    
    Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>

diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
index 5d94c70..e50971c 100755
--- a/lang/python/setup.py.in
+++ b/lang/python/setup.py.in
@@ -19,18 +19,12 @@
 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 
 from distutils.core import setup, Extension
-import argparse
 import os, os.path, sys
 import glob
 import re
 import shutil
 import subprocess
 
-# We parse a subset of the arguments.
-parser = argparse.ArgumentParser(add_help=False)
-parser.add_argument('--build-base', default='')
-options, _ = parser.parse_known_args()
-
 # Out-of-tree build of the gpg bindings.
 gpg_error_config = ["gpg-error-config"]
 gpgme_config_flags = ["--thread=pthread"]
@@ -142,8 +136,6 @@ if uname_s.startswith("MINGW32"):
 
 def in_srcdir(name):
     return os.path.join(os.environ.get("srcdir", ""), name)
-def in_build_base(name):
-    return os.path.join(options.build_base, name)
 def up_to_date(source, target):
     return (os.path.exists(target)
             and os.path.getmtime(source) <= os.path.getmtime(target))
@@ -190,6 +182,9 @@ class BuildExtFirstHack(build):
                     continue
                 sink.write(rewrite_re.sub(r'%constant long \1 = \1;'+'\n', line.strip()))
 
+    def _in_build_base(self, name):
+        return os.path.join(self.build_base, name)
+
     def _generate(self):
         print("Building python gpg module using {} and {}.".format(gpgme_h, gpg_error_h))
 
@@ -197,18 +192,18 @@ class BuildExtFirstHack(build):
         if not os.path.exists(self.build_base):
             os.makedirs(self.build_base)
 
-        self._generate_gpgme_h(gpgme_h, in_build_base("gpgme.h"))
-        self._generate_errors_i(gpg_error_h, in_build_base("errors.i"))
+        self._generate_gpgme_h(gpgme_h, self._in_build_base("gpgme.h"))
+        self._generate_errors_i(gpg_error_h, self._in_build_base("errors.i"))
 
         # Keep timestamp to avoid rebuild
-        for source, target in ((gpgme_h, in_build_base("gpgme.h")),
-                               (gpg_error_h, in_build_base("errors.i"))):
+        for source, target in ((gpgme_h, self._in_build_base("gpgme.h")),
+                               (gpg_error_h, self._in_build_base("errors.i"))):
             if not up_to_date(source, target):
                 shutil.copystat(source, target)
 
         # Copy due to http://bugs.python.org/issue2624
         # Avoid creating in srcdir
-        for source, target in ((in_srcdir(n), in_build_base(n))
+        for source, target in ((in_srcdir(n), self._in_build_base(n))
                                for n in ('gpgme.i', 'helpers.c', 'private.h', 'helpers.h')):
             if not up_to_date(source, target):
                 shutil.copy2(source, target)
@@ -221,7 +216,7 @@ class BuildExtFirstHack(build):
     def run(self):
         self._generate()
 
-        swig_sources.append(os.path.join(self.build_base, 'gpgme.i'))
+        swig_sources.extend((self._in_build_base('gpgme.i'), self._in_build_base('helpers.c')))
         swig_opts.extend(['-I' + self.build_base,
                           '-outdir', os.path.join(self.build_lib, 'gpg')])
         include_dirs.append(self.build_base)
@@ -230,7 +225,7 @@ class BuildExtFirstHack(build):
         build.run(self)
 
 py3 = [] if sys.version_info.major < 3 else ['-py3']
-swig_sources = [in_build_base('helpers.c')]
+swig_sources = []
 swig_opts = ['-threads'] + py3 + extra_swig_opts
 swige = Extension("gpg._gpgme",
                   sources = swig_sources,

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

Summary of changes:
 configure.ac                   |  1 -
 lang/python/Makefile.am        | 27 ++++++--------
 lang/python/setup.py.in        | 85 +++++++++++++++++++++---------------------
 lang/python/tests/run-tests.py | 25 ++++++++-----
 lang/qt/tests/Makefile.am      | 12 ++----
 tests/gpg/Makefile.am          |  9 +----
 6 files changed, 74 insertions(+), 85 deletions(-)


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




More information about the Gnupg-commits mailing list