aboutsummaryrefslogtreecommitdiffstats
path: root/lang/python/Makefile.am
diff options
context:
space:
mode:
authorJustus Winter <[email protected]>2016-05-24 15:22:08 +0000
committerJustus Winter <[email protected]>2016-05-24 16:00:16 +0000
commit7bc9cc717e428f48d4b27016f44c9f3900b1fba6 (patch)
tree23af4206eb2268aa8157b6354b2410feab22e520 /lang/python/Makefile.am
parentpython: Move the base wrapper class. (diff)
downloadgpgme-7bc9cc717e428f48d4b27016f44c9f3900b1fba6.tar.gz
gpgme-7bc9cc717e428f48d4b27016f44c9f3900b1fba6.zip
python: Make all GnuPG errors available.
* lang/python/Makefile.am (errors.i): Generate file. * lang/python/gpgme.i: Include generated file. * lang/python/pyme/errors.py: Pull in all errors and error sources. Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'lang/python/Makefile.am')
-rw-r--r--lang/python/Makefile.am10
1 files changed, 8 insertions, 2 deletions
diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am
index 86c19659..f58f0798 100644
--- a/lang/python/Makefile.am
+++ b/lang/python/Makefile.am
@@ -29,7 +29,12 @@ copystamp: $(srcdir)/pyme $(srcdir)/helpers.c $(srcdir)/helpers.h
if test "$(srcdir)" != "$(builddir)" ; then cp -r $^ . ; fi
touch $@
-gpgme_wrap.c pyme/pygpgme.py: gpgme.i gpgme.h copystamp
+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 $(SWIGOPT) \
-o $(builddir)/gpgme_wrap.c -outdir $(builddir)/pyme \
$<
@@ -38,7 +43,8 @@ all-local: gpgme_wrap.c pyme/pygpgme.py copystamp
$(PYTHON) $(srcdir)/setup.py build --verbose
clean-local:
- rm -rf -- build gpgme.h gpgme_wrap.c pyme/pygpgme.py copystamp
+ rm -rf -- build gpgme.h errors.i gpgme_wrap.c pyme/pygpgme.py \
+ copystamp
if test "$(srcdir)" != "$(builddir)" ; then \
rm -rf pyme helpers.c helpers.h ; \
fi