summaryrefslogtreecommitdiff
path: root/python/setup.py
diff options
context:
space:
mode:
authorPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-06-14 20:13:04 +0200
committerPatrick Simianer <simianer@cl.uni-heidelberg.de>2012-06-14 20:13:04 +0200
commite311547aeb5240d78a734e219c95d0900626effa (patch)
treef4fe29f8941baf2353feb0a97c09a97a145acda5 /python/setup.py
parent780c95c5eb0c1ec6fd19951587cf139d996cc44d (diff)
parent74b6f83f4e7aed662e104df00bb3d02c937d09e6 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'python/setup.py')
-rw-r--r--python/setup.py13
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'])
]