aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/Makefile.am
diff options
context:
space:
mode:
authorAlon Bar-Lev <[email protected]>2016-09-29 07:30:58 +0000
committerJustus Winter <[email protected]>2016-09-30 12:47:26 +0000
commit453ab9d24ca48c9e01d21e1454d6b08de1938b76 (patch)
tree8e275037655f48da32e97277c2a32d963d3c8f07 /lang/python/Makefile.am
parentpython: Add 'prepare' target. (diff)
downloadgpgme-453ab9d24ca48c9e01d21e1454d6b08de1938b76.tar.gz
gpgme-453ab9d24ca48c9e01d21e1454d6b08de1938b76.zip
python: Link 'data.h' and 'config.h' into the builddir.
* lang/python/Makefile.am: Link to the files. * lang/python/gpgme.i: Update path. * lang/python/setup.py.in: Do not add the top builddir to the include path. -- To make it easy to build the subpackage using standard tools without altering environment or CFLAGS, symlink the required artifacts from source tree into subpackage directory when preparing sources. Signed-off-by: Alon Bar-Lev <[email protected]>
Diffstat (limited to 'lang/python/Makefile.am')
-rw-r--r--lang/python/Makefile.am15
1 files changed, 10 insertions, 5 deletions
diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
index ea37da97..9cb99c44 100644
--- a/lang/python/Makefile.am
+++ b/lang/python/Makefile.am
@@ -46,22 +46,27 @@ COPY_FILES_PYME = \
# For VPATH builds we need to copy some files because Python's
# distutils are not VPATH-aware.
-copystamp: $(COPY_FILES) $(COPY_FILES_PYME)
+copystamp: $(COPY_FILES) $(COPY_FILES_PYME) data.h config.h
if test "$(srcdir)" != "$(builddir)" ; then \
cp -R $(COPY_FILES) . ; \
cp -R $(COPY_FILES_PYME) pyme ; \
fi
touch $@
+data.h:
+ ln -s "$(top_srcdir)/src/data.h"
+
+config.h:
+ ln -s "$(top_builddir)/config.h"
+
all-local: copystamp
for PYTHON in $(PYTHONS); do \
- CFLAGS="$(CFLAGS) -I$(top_srcdir)" \
- top_builddir="$(top_builddir)" \
+ CFLAGS="$(CFLAGS)" \
$$PYTHON setup.py build --verbose ; \
done
dist/pyme3-$(VERSION).tar.gz dist/pyme3-$(VERSION).tar.gz.asc: copystamp
- CFLAGS="$(CFLAGS) -I$(top_srcdir)" \
+ CFLAGS="$(CFLAGS)" \
$(PYTHON) setup.py sdist --verbose
gpg2 --detach-sign --armor dist/pyme3-$(VERSION).tar.gz
@@ -76,7 +81,7 @@ upload: dist/pyme3-$(VERSION).tar.gz dist/pyme3-$(VERSION).tar.gz.asc
twine upload $^
CLEANFILES = gpgme.h errors.i gpgme_wrap.c pyme/gpgme.py \
- copystamp
+ data.h config.h copystamp
# Remove the rest.
#