Ticket #47530: patch-disable-find_library-fallback.diff

File patch-disable-find_library-fallback.diff, 1.0 KB (added by bgilbert (Benjamin Gilbert), 10 years ago)

patch-disable-find_library-fallback.diff

  • openslide/lowlevel.py

    old new  
    3838if platform.system() == 'Windows':
    3939    _lib = cdll.LoadLibrary('libopenslide-0.dll')
    4040elif 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) 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')
    5442else:
    5543    _lib = cdll.LoadLibrary('libopenslide.so.0')
    5644