--- openslide/lowlevel.py.orig 2016-06-12 00:26:33.183561713 -0500 +++ openslide/lowlevel.py 2016-06-12 00:26:36.116565929 -0500 @@ -40,20 +40,7 @@ if platform.system() == 'Windows': _lib = cdll.LoadLibrary('libopenslide-0.dll') elif platform.system() == 'Darwin': - try: - _lib = cdll.LoadLibrary('libopenslide.0.dylib') - except OSError: - # MacPorts doesn't add itself to the dyld search path, but - # does add itself to the find_library() search path - # (DEFAULT_LIBRARY_FALLBACK in ctypes.macholib.dyld) on - # Python 2.6 and 2.7. Python 3 users on MacPorts should add - # the MacPorts lib directory to DYLD_LIBRARY_PATH. - import ctypes.util - _lib = ctypes.util.find_library('openslide') - if _lib is None: - raise ImportError("Couldn't locate OpenSlide dylib. " + - "Is OpenSlide installed?") - _lib = cdll.LoadLibrary(_lib) + _lib = cdll.LoadLibrary('@@PREFIX@@/lib/libopenslide.0.dylib') else: _lib = cdll.LoadLibrary('libopenslide.so.0')