From 4c8265d32ddff5960a464b8d4e8d7d2258495b2e Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Tue, 2 Aug 2016 18:45:10 +0200 Subject: python: Add a flag identifying in-tree builds. * lang/python/helpers.c (pyme_in_tree_build): New variable. * lang/python/helpers.h (pyme_in_tree_build): New declaration. * lang/python/pyme/version.py.in (in_tree_build): New variable. * lang/python/setup.py.in: Rework macro handling, set 'IN_TREE_BUILD' as appropriate. Signed-off-by: Justus Winter --- lang/python/helpers.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lang/python/helpers.c') diff --git a/lang/python/helpers.c b/lang/python/helpers.c index 0406f9f8..0b4a7736 100644 --- a/lang/python/helpers.c +++ b/lang/python/helpers.c @@ -28,6 +28,15 @@ #include "helpers.h" #include "private.h" +/* Flag specifying whether this is an in-tree build. */ +int pyme_in_tree_build = +#if IN_TREE_BUILD + 1 +#else + 0 +#endif + ; + static PyObject *GPGMEError = NULL; void _pyme_exception_init(void) { -- cgit v1.2.3