From 5510c23811d1c3247c480903b14f0faebbbd5596 Mon Sep 17 00:00:00 2001 From: Peter Eastman Date: Tue, 5 Nov 2024 15:37:17 -0800 Subject: [PATCH] Add pytorch lib dir to rpath (#158) --- python/setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/setup.py b/python/setup.py index 8b7c8ea..99d5797 100644 --- a/python/setup.py +++ b/python/setup.py @@ -14,14 +14,14 @@ if platform.system() == 'Darwin': extra_compile_args += ['-stdlib=libc++', '-mmacosx-version-min=10.13'] - extra_link_args += ['-stdlib=libc++', '-mmacosx-version-min=10.13', '-Wl', '-rpath', openmm_dir+'/lib', '-rpath', torch_dir] + extra_link_args += ['-stdlib=libc++', '-mmacosx-version-min=10.13'] extension = Extension(name='_openmmtorch', sources=['TorchPluginWrapper.cpp'], libraries=['OpenMM', 'OpenMMTorch'], include_dirs=[os.path.join(openmm_dir, 'include'), nn_plugin_header_dir] + torch_include_dirs, library_dirs=[os.path.join(openmm_dir, 'lib'), nn_plugin_library_dir], - runtime_library_dirs=[os.path.join(openmm_dir, 'lib')], + runtime_library_dirs=[os.path.join(openmm_dir, 'lib'), torch_dir], extra_compile_args=extra_compile_args, extra_link_args=extra_link_args )