From ca740f90f9e4047b5cd0adaffa4ce6c534c54e7f Mon Sep 17 00:00:00 2001 From: John Evans Date: Mon, 29 Jul 2013 17:49:43 -0400 Subject: [PATCH] Need to infer the location of openjp2 when not found by ctypes. #90 --- glymur/lib/config.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/glymur/lib/config.py b/glymur/lib/config.py index bbdb056..72d91a9 100644 --- a/glymur/lib/config.py +++ b/glymur/lib/config.py @@ -104,6 +104,12 @@ def load_openjp2(libopenjp2_path): # No help from the config file, try to find it ourselves. libopenjp2_path = find_library('openjp2') + if libopenjp2_path is None: + if platform.system() == 'Darwin': + path = '/opt/local/lib/libopenjp2.dylib' + if os.path.exists(path): + libopenjp2_path = path + if libopenjp2_path is None: return None