41 | | try: |
42 | | _lib = cdll.LoadLibrary('libopenslide.0.dylib') |
43 | | except OSError: |
44 | | # MacPorts doesn't add itself to the dyld search path, but |
45 | | # does add itself to the find_library() search path |
46 | | # (DEFAULT_LIBRARY_FALLBACK in ctypes.macholib.dyld) on |
47 | | # Python 2.6 and 2.7. Python 3 users on MacPorts should add |
48 | | # the MacPorts lib directory to DYLD_LIBRARY_PATH. |
49 | | import ctypes.util |
50 | | _lib = ctypes.util.find_library('openslide') |
51 | | if _lib is None: |
52 | | raise ImportError("Couldn't locate OpenSlide library") |
53 | | _lib = cdll.LoadLibrary(_lib) |
| 41 | _lib = cdll.LoadLibrary('@@PREFIX@@/lib/libopenslide.0.dylib') |