From 9786e3a96e6772166f3523e74a748b9db20fae7c Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Tue, 28 Mar 2017 21:55:59 +0300 Subject: python,build: Reinstate prepare target. * lang/python/Makefile.am: Fix 'prepare' target. * lang/python/setup.py.in: Use 'abs_top_builddir' instead of guessing the path. -- 'prepare' will prepare target at PREPAREDIR. The automake integration will also make use of prepare target. Downstream distributors may also make use of prepare target. Signed-off-by: Alon Bar-Lev --- lang/python/setup.py.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lang/python/setup.py.in') diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in index bf4efa31..8ddbf276 100755 --- a/lang/python/setup.py.in +++ b/lang/python/setup.py.in @@ -34,12 +34,13 @@ in_tree = False extra_swig_opts = [] extra_macros = dict() -if os.path.exists("../../../src/gpgme-config"): +abs_top_builddir = os.environ.get("abs_top_builddir") +if abs_top_builddir: # In-tree build. in_tree = True - gpgme_config = ["../../../src/gpgme-config"] + gpgme_config_flags - gpgme_h = "../../../src/gpgme.h" - library_dirs = ["../../../src/.libs"] # XXX uses libtool internals + gpgme_config = [os.path.join(abs_top_builddir, "src/gpgme-config")] + gpgme_config_flags + gpgme_h = os.path.join(abs_top_builddir, "src/gpgme.h") + library_dirs = [os.path.join(abs_top_builddir, "src/.libs")] # XXX uses libtool internals extra_macros.update( HAVE_CONFIG_H=1, HAVE_DATA_H=1, -- cgit v1.2.3