From ac6681cc47bb8474925e43182ccea02545372912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=BCller?= Date: Wed, 22 Jun 2016 15:23:25 +0200 Subject: [PATCH] Setup.py --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 66c0c53..26370b9 100644 --- a/setup.py +++ b/setup.py @@ -15,10 +15,12 @@ def check_header_version(include_path): print('Gromacs version could not be checked.') include_dirs = [numpy.get_include()] +library_dirs = [] if 'gromacs' in os.environ.get('LD_LIBRARY_PATH', ''): for p in os.environ['LD_LIBRARY_PATH'].split(':'): if 'gromacs' in p: + library_dirs.append(p) lib = p gmx_root = lib.split('lib')[0] include = os.path.join(gmx_root, 'include') @@ -42,6 +44,7 @@ extensions = [ sources=['pygmx/tpxio.pyx'], include_dirs=include_dirs, libraries=['gromacs'], + library_dirs=library_dirs, language='c++' ), Extension( @@ -49,6 +52,7 @@ extensions = [ sources=['pygmx/xtcio.pyx'], include_dirs=include_dirs, libraries=['gromacs'], + library_dirs=library_dirs, language='c++' ), # Extension('pygmx.enxio',