diff options
author | Justus Winter <[email protected]> | 2016-07-11 14:38:37 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-07-11 16:09:54 +0000 |
commit | 007382ce94a6318557370c440f7d609a030a119e (patch) | |
tree | 45875e9d7566290ef77c086b513338a9458624ca /lang/python/Makefile.am | |
parent | python: Do not depend on access to internal data structures. (diff) | |
download | gpgme-007382ce94a6318557370c440f7d609a030a119e.tar.gz gpgme-007382ce94a6318557370c440f7d609a030a119e.zip |
python: Enable out-of-tree build of pyme bindings.
* lang/python/MANIFEST.in: Update manifest template.
* lang/python/Makefile.am: Copy more files, move generation of files
to Python build script, add 'sdist' target to build a Python source
distribution.
* lang/python/gpgme-h-clean.py: Add code to build 'errors.i'.
* lang/python/setup.py.in: Generate files, enable out-of-tree builds.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'lang/python/Makefile.am')
-rw-r--r-- | lang/python/Makefile.am | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am index 527212a2..89b1c28c 100644 --- a/lang/python/Makefile.am +++ b/lang/python/Makefile.am @@ -26,34 +26,30 @@ EXTRA_DIST = \ SUBDIRS = tests COPY_FILES = \ + $(srcdir)/gpgme.i \ $(srcdir)/README \ + $(srcdir)/MANIFEST.in \ + $(srcdir)/gpgme-h-clean.py \ $(srcdir)/pyme \ + $(srcdir)/examples \ $(srcdir)/helpers.c $(srcdir)/helpers.h -# Cleanup gpgme.h from deprecated functions and typedefs. -gpgme.h: ../../src/gpgme.h $(srcdir)/gpgme-h-clean.py - $(PYTHON) $(srcdir)/gpgme-h-clean.py $< >$@ - # For VPATH builds we need to copy some files because Python's # distutils are not VPATH-aware. copystamp: $(COPY_FILES) if test "$(srcdir)" != "$(builddir)" ; then cp -r $^ . ; fi touch $@ -errors.i: - sed -n -e \ - '/GPG_ERR_[^ ]* =/s/ *\(.*\) = .*/%constant long \1 = \1;/p' \ - `$(GPG_ERROR_CONFIG) --prefix`/include/gpg-error.h >$@ - -gpgme_wrap.c pyme/pygpgme.py: gpgme.i errors.i gpgme.h copystamp - $(SWIG) -python -py3 -builtin $(SWIGOPT) \ - -o $(builddir)/gpgme_wrap.c -outdir $(builddir)/pyme \ - $< - -all-local: gpgme_wrap.c pyme/pygpgme.py copystamp +all-local: copystamp CFLAGS="$(CFLAGS) -I$(top_srcdir)" \ $(PYTHON) setup.py build --verbose +dist/pyme3-$(VERSION).tar.gz: copystamp + CFLAGS="$(CFLAGS) -I$(top_srcdir)" \ + $(PYTHON) setup.py sdist --verbose + +sdist: dist/pyme3-$(VERSION).tar.gz + CLEANFILES = gpgme.h errors.i gpgme_wrap.c pyme/pygpgme.py \ copystamp @@ -65,7 +61,7 @@ clean-local: rm -rf -- build if test "$(srcdir)" != "$(builddir)" ; then \ find . -type d ! -perm -200 -exec chmod u+w {} ';' ; \ - rm -rf README pyme helpers.c helpers.h ; \ + for F in $(COPY_FILES); do rm -rf -- `basename $$F` ; done ; \ fi install-exec-local: |