at master 1.2 kB view raw
1diff --git a/turbojpeg.py b/turbojpeg.py 2index 73edb38..bfa8c67 100644 3--- a/turbojpeg.py 4+++ b/turbojpeg.py 5@@ -408,22 +408,7 @@ class TurboJPEG(object): 6 7 def __find_turbojpeg(self): 8 """returns default turbojpeg library path if possible""" 9- lib_path = find_library('turbojpeg') 10- if lib_path is not None: 11- return lib_path 12- for lib_path in DEFAULT_LIB_PATHS[platform.system()]: 13- if os.path.exists(lib_path): 14- return lib_path 15- if platform.system() == 'Linux' and 'LD_LIBRARY_PATH' in os.environ: 16- ld_library_path = os.environ['LD_LIBRARY_PATH'] 17- for path in ld_library_path.split(':'): 18- lib_path = os.path.join(path, 'libturbojpeg.so.0') 19- if os.path.exists(lib_path): 20- return lib_path 21- raise RuntimeError( 22- 'Unable to locate turbojpeg library automatically. ' 23- 'You may specify the turbojpeg library path manually.\n' 24- 'e.g. jpeg = TurboJPEG(lib_path)') 25+ return '@libturbojpeg@' 26 27 def __getaddr(self, nda): 28 """returns the memory address for a given ndarray"""