diff --git a/CHANGES.txt b/CHANGES.txt index 68fe102..981672d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +Oct 29, 2013 - v0.5.8 Fixed unnecessary warnings when default locations for + openjpeg libraries on mac do not specify the actual library. + Oct 28, 2013 - v0.5.7 Fixed bad import error message when libopenjpeg library not installed on mac. diff --git a/docs/source/conf.py b/docs/source/conf.py index 90db6a3..0338c5a 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -78,7 +78,7 @@ copyright = u'2013, John Evans' # The short X.Y version. version = '0.5' # The full version, including alpha/beta/rc tags. -release = '0.5.7' +release = '0.5.8' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/glymur/lib/config.py b/glymur/lib/config.py index 2a85cbe..69d258e 100644 --- a/glymur/lib/config.py +++ b/glymur/lib/config.py @@ -45,6 +45,12 @@ def glymurrc_fname(): def load_openjpeg(path): """Load the openjpeg library, falling back on defaults if necessary. + + Parameters + ---------- + path : str + Path to openjpeg 1.5 library as specified by configuration file. Will + be None if no configuration file specified. """ if path is None: # Let ctypes try to find it. @@ -84,7 +90,9 @@ def load_openjp2(path): def load_library_handle(path): """Load the library, return the ctypes handle.""" - if path is None: + if path is None or (path is not None and not os.path.exists(path)): + # Either could not find a library via ctypes or user-configuration-file, + # or we could not find it in any of the default locations. return None try: @@ -93,10 +101,10 @@ def load_library_handle(path): else: opj_lib = ctypes.CDLL(path) except (TypeError, OSError): - msg = '"Library {0}" could not be loaded. Operating in degraded mode.' - msg = msg.format(path) - warnings.warn(msg, UserWarning) - opj_lib = None + msg = '"Library {0}" could not be loaded. Operating in degraded mode.' + msg = msg.format(path) + warnings.warn(msg, UserWarning) + opj_lib = None return opj_lib diff --git a/glymur/version.py b/glymur/version.py index 6068a93..0fb4b86 100644 --- a/glymur/version.py +++ b/glymur/version.py @@ -15,7 +15,7 @@ from .lib import openjp2 as opj2 # Do not change the format of this next line! Doing so risks breaking # setup.py -version = "0.5.7" +version = "0.5.8" _sv = LooseVersion(version) version_tuple = _sv.version