Ticket #46256: patch-disable-find_library-fallback.diff
File patch-disable-find_library-fallback.diff, 894 bytes (added by bgilbert (Benjamin Gilbert), 10 years ago) |
---|
-
openslide/lowlevel.py
old new 38 38 if platform.system() == 'Windows': 39 39 _lib = cdll.LoadLibrary('libopenslide-0.dll') 40 40 elif platform.system() == 'Darwin': 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). 47 import ctypes.util 48 _lib = ctypes.util.find_library('openslide') 49 if _lib is None: 50 raise ImportError("Couldn't locate OpenSlide library") 51 _lib = cdll.LoadLibrary(_lib) 41 _lib = cdll.LoadLibrary('@@PREFIX@@/lib/libopenslide.0.dylib') 52 42 else: 53 43 _lib = cdll.LoadLibrary('libopenslide.so.0') 54 44