[git] GPGME - branch, master, updated. gpgme-1.9.0-6-g9786e3a

by Alon Bar-Lev cvs at cvs.gnupg.org
Wed Mar 29 11:33:23 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  9786e3a96e6772166f3523e74a748b9db20fae7c (commit)
      from  7e9f7752c992f957ccfde3b274865c633096e3bb (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 9786e3a96e6772166f3523e74a748b9db20fae7c
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date:   Tue Mar 28 21:55:59 2017 +0300

    python,build: Reinstate prepare target.
    
    * lang/python/Makefile.am: Fix 'prepare' target.
    * lang/python/setup.py.in: Use 'abs_top_builddir' instead of guessing
    the path.
    --
    
    'prepare' will prepare target at PREPAREDIR.  The automake integration
    will also make use of prepare target.  Downstream distributors may
    also make use of prepare target.
    
    Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>

diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
index d91ead9..a18a014 100644
--- a/lang/python/Makefile.am
+++ b/lang/python/Makefile.am
@@ -44,17 +44,22 @@ COPY_FILES_GPG = \
 	$(srcdir)/gpg/results.py \
 	$(srcdir)/gpg/util.py
 
+.PHONY: prepare
+prepare:
+	test -n "$(PREPAREDIR)"
+	$(MKDIR_P)              "$(PREPAREDIR)/gpg"
+	cp -R $(COPY_FILES)     "$(PREPAREDIR)"
+	cp setup.py             "$(PREPAREDIR)"
+	cp gpg/version.py       "$(PREPAREDIR)/gpg"
+	ln -sf "$(abs_top_srcdir)/src/data.h" "$(PREPAREDIR)"
+	ln -sf "$(abs_top_builddir)/config.h" "$(PREPAREDIR)"
+	cp -R $(COPY_FILES_GPG) "$(PREPAREDIR)/gpg"
+
 # For VPATH builds we need to copy some files because Python's
 # distutils are not VPATH-aware.
 copystamp: $(COPY_FILES) $(COPY_FILES_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 ; \
+	  $(MAKE) PREPAREDIR=python$${VERSION}-gpg prepare; \
 	done
 	touch $@
 
@@ -63,6 +68,7 @@ all-local: copystamp
 	  PYTHON="$$1" ; shift ; \
 	  cd python$${VERSION}-gpg && \
 	  CFLAGS="$(CFLAGS)" \
+	  abs_top_builddir="$(abs_top_builddir)" \
 	    $$PYTHON setup.py build --verbose ; \
 	  cd .. ; \
 	done
@@ -71,12 +77,10 @@ python$(PYTHON_VERSION)-gpg/dist/gpg-$(VERSION).tar.gz \
 python$(PYTHON_VERSION)-gpg/dist/gpg-$(VERSION).tar.gz.asc: copystamp
 	cd python$(PYTHON_VERSION)-gpg && \
 	CFLAGS="$(CFLAGS)" \
+	abs_top_builddir="$(abs_top_builddir)" \
 	  $(PYTHON) setup.py sdist --verbose
 	gpg2 --detach-sign --armor python$(PYTHON_VERSION)-gpg/dist/gpg-$(VERSION).tar.gz
 
-.PHONY: prepare
-prepare: copystamp
-
 .PHONY: sdist
 sdist: python$(PYTHON_VERSION)-gpg/dist/gpg-$(VERSION).tar.gz \
        python$(PYTHON_VERSION)-gpg/dist/gpg-$(VERSION).tar.gz.asc
@@ -104,6 +108,7 @@ install-exec-local:
 	set -e ; set $(PYTHONS); for VERSION in $(PYTHON_VERSIONS); do \
 	  PYTHON="$$1" ; shift ; \
 	  cd python$${VERSION}-gpg ; \
+	  abs_top_builddir="$(abs_top_builddir)" \
 	  $$PYTHON setup.py install \
 	  --prefix $(DESTDIR)$(prefix) \
 	  --record files.txt \
diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
index bf4efa3..8ddbf27 100755
--- a/lang/python/setup.py.in
+++ b/lang/python/setup.py.in
@@ -34,12 +34,13 @@ in_tree = False
 extra_swig_opts = []
 extra_macros = dict()
 
-if os.path.exists("../../../src/gpgme-config"):
+abs_top_builddir = os.environ.get("abs_top_builddir")
+if abs_top_builddir:
     # In-tree build.
     in_tree = True
-    gpgme_config = ["../../../src/gpgme-config"] + gpgme_config_flags
-    gpgme_h = "../../../src/gpgme.h"
-    library_dirs = ["../../../src/.libs"] # XXX uses libtool internals
+    gpgme_config = [os.path.join(abs_top_builddir, "src/gpgme-config")] + gpgme_config_flags
+    gpgme_h = os.path.join(abs_top_builddir, "src/gpgme.h")
+    library_dirs = [os.path.join(abs_top_builddir, "src/.libs")] # XXX uses libtool internals
     extra_macros.update(
         HAVE_CONFIG_H=1,
         HAVE_DATA_H=1,

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

Summary of changes:
 lang/python/Makefile.am | 25 +++++++++++++++----------
 lang/python/setup.py.in |  9 +++++----
 2 files changed, 20 insertions(+), 14 deletions(-)


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




More information about the Gnupg-commits mailing list