Created
January 9, 2013 10:49
-
-
Save derekbrokeit/4492277 to your computer and use it in GitHub Desktop.
Explicitly call the library based on the homebrew prefix location. This is best for users who do not use the standard homebrew installation directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/python/lammps.py b/python/lammps.py | |
| index c65e84c..b2b28a2 100644 | |
| --- a/python/lammps.py | |
| +++ b/python/lammps.py | |
| @@ -23,8 +23,8 @@ class lammps: | |
| # if name = "g++", load liblammps_g++.so | |
| try: | |
| - if not name: self.lib = CDLL("liblammps.so",RTLD_GLOBAL) | |
| - else: self.lib = CDLL("liblammps_%s.so" % name,RTLD_GLOBAL) | |
| + if not name: self.lib = CDLL("#{HOMEBREW_PREFIX}/lib/liblammps.so",RTLD_GLOBAL) | |
| + else: self.lib = CDLL("#{HOMEBREW_PREFIX}/lib/liblammps_%s.so" % name,RTLD_GLOBAL) | |
| except: | |
| type,value,tb = sys.exc_info() | |
| traceback.print_exception(type,value,tb) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment