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.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lang/python/helpers.h') diff --git a/lang/python/helpers.h b/lang/python/helpers.h index 16a9b9fd..9200f937 100644 --- a/lang/python/helpers.h +++ b/lang/python/helpers.h @@ -26,6 +26,9 @@ #define write(fd, str, sz) {DWORD written; WriteFile((HANDLE) fd, str, sz, &written, 0);} #endif +/* Flag specifying whether this is an in-tree build. */ +extern int pyme_in_tree_build; + PyObject *pyme_raise_callback_exception(PyObject *self); PyObject *pyme_set_passphrase_cb(PyObject *self, PyObject *cb); -- cgit v1.2.3