[build] Adding include and library dirs based on autoconf prefix
This commit is contained in:
11
setup.py
11
setup.py
@@ -52,6 +52,9 @@ class InstallWithDependencies(install):
|
|||||||
if not os.path.exists(self.prefix):
|
if not os.path.exists(self.prefix):
|
||||||
os.mkdir(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:
|
if self.datadir is None and self.prefix:
|
||||||
self.datadir = os.path.join(self.prefix, 'data')
|
self.datadir = os.path.join(self.prefix, 'data')
|
||||||
|
|
||||||
@@ -107,9 +110,7 @@ def main():
|
|||||||
),
|
),
|
||||||
Extension('postal._expand',
|
Extension('postal._expand',
|
||||||
sources=['python/postal/pyexpand.c'],
|
sources=['python/postal/pyexpand.c'],
|
||||||
include_dirs=[this_dir, os.path.join(this_dir, SRC_DIR)],
|
include_dirs=[this_dir],
|
||||||
library_dirs=[os.path.join(this_dir, SRC_DIR, '.libs'),
|
|
||||||
os.path.join(this_dir, SRC_DIR)],
|
|
||||||
libraries=['postal'],
|
libraries=['postal'],
|
||||||
extra_compile_args=['-std=c99',
|
extra_compile_args=['-std=c99',
|
||||||
'-DHAVE_CONFIG_H',
|
'-DHAVE_CONFIG_H',
|
||||||
@@ -117,9 +118,7 @@ def main():
|
|||||||
),
|
),
|
||||||
Extension('postal._parser',
|
Extension('postal._parser',
|
||||||
sources=['python/postal/pyparser.c'],
|
sources=['python/postal/pyparser.c'],
|
||||||
include_dirs=[this_dir, os.path.join(this_dir, SRC_DIR)],
|
include_dirs=[this_dir],
|
||||||
library_dirs=[os.path.join(this_dir, SRC_DIR, '.libs'),
|
|
||||||
os.path.join(this_dir, SRC_DIR)],
|
|
||||||
libraries=['postal'],
|
libraries=['postal'],
|
||||||
extra_compile_args=['-std=c99',
|
extra_compile_args=['-std=c99',
|
||||||
'-DHAVE_CONFIG_H',
|
'-DHAVE_CONFIG_H',
|
||||||
|
|||||||
Reference in New Issue
Block a user