From cb648b63da91f5df2ff7fea417f1af09c841a20e Mon Sep 17 00:00:00 2001 From: Al Date: Tue, 15 Dec 2015 02:21:15 -0500 Subject: [PATCH] [build] Adding include and library dirs based on autoconf prefix --- setup.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 3dec3f37..bf35d738 100644 --- a/setup.py +++ b/setup.py @@ -52,6 +52,9 @@ class InstallWithDependencies(install): if not os.path.exists(self.prefix): os.mkdir(self.prefix) + self.include_dirs = (self.include_dirs or []) + [os.path.join(self.prefix, 'include')] + self.library_dirs = (self.library_dirs or []) + [os.path.join(self.prefix, 'lib')] + if self.datadir is None and self.prefix: self.datadir = os.path.join(self.prefix, 'data') @@ -107,9 +110,7 @@ def main(): ), Extension('postal._expand', sources=['python/postal/pyexpand.c'], - include_dirs=[this_dir, os.path.join(this_dir, SRC_DIR)], - library_dirs=[os.path.join(this_dir, SRC_DIR, '.libs'), - os.path.join(this_dir, SRC_DIR)], + include_dirs=[this_dir], libraries=['postal'], extra_compile_args=['-std=c99', '-DHAVE_CONFIG_H', @@ -117,9 +118,7 @@ def main(): ), Extension('postal._parser', sources=['python/postal/pyparser.c'], - include_dirs=[this_dir, os.path.join(this_dir, SRC_DIR)], - library_dirs=[os.path.join(this_dir, SRC_DIR, '.libs'), - os.path.join(this_dir, SRC_DIR)], + include_dirs=[this_dir], libraries=['postal'], extra_compile_args=['-std=c99', '-DHAVE_CONFIG_H',