diff options
author | Chris Dyer <cdyer@cs.cmu.edu> | 2012-06-18 18:34:21 -0400 |
---|---|---|
committer | Chris Dyer <cdyer@cs.cmu.edu> | 2012-06-18 18:34:21 -0400 |
commit | 953ec50e659084c13433ea311f6a07e7e1b292f8 (patch) | |
tree | e04361bc661740a08a8bf045aa8c4e5bcd691d85 /python/setup.py | |
parent | d9d602cf26e3696a5e575f314547b823254dba32 (diff) | |
parent | 681ba488e82b8e2079f2d6c2af63014fa86834ac (diff) |
Merge branch 'master' of github.com:redpony/cdec
Diffstat (limited to 'python/setup.py')
-rw-r--r-- | python/setup.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/python/setup.py b/python/setup.py index 756de088..49a1ec8f 100644 --- a/python/setup.py +++ b/python/setup.py @@ -1,13 +1,22 @@ from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext +import os + +INC = ['..', 'src/', '../decoder', '../utils'] +LIB = ['../decoder', '../utils', '../mteval', '../klm/lm', '../klm/util'] + +BOOST_ROOT = os.getenv('BOOST_ROOT') +if BOOST_ROOT: + INC.append(os.path.join(BOOST_ROOT, 'include/')) + LIB.append(os.path.join(BOOST_ROOT, 'lib/')) ext_modules = [ Extension(name='_cdec', sources=['src/_cdec.pyx'], language='C++', - include_dirs=['..', 'src/', '../decoder', '../utils'], - library_dirs=['../decoder', '../utils', '../mteval', '../klm/lm', '../klm/util'], + include_dirs=INC, + library_dirs=LIB, libraries=['boost_program_options-mt', 'z', 'cdec', 'utils', 'mteval', 'klm', 'klm_util']) ] |