29 lines
1.2 KiB
Diff
29 lines
1.2 KiB
Diff
|
diff --git a/turbojpeg.py b/turbojpeg.py
|
||
|
index 73edb38..bfa8c67 100644
|
||
|
--- a/turbojpeg.py
|
||
|
+++ b/turbojpeg.py
|
||
|
@@ -408,22 +408,7 @@ class TurboJPEG(object):
|
||
|
|
||
|
def __find_turbojpeg(self):
|
||
|
"""returns default turbojpeg library path if possible"""
|
||
|
- lib_path = find_library('turbojpeg')
|
||
|
- if lib_path is not None:
|
||
|
- return lib_path
|
||
|
- for lib_path in DEFAULT_LIB_PATHS[platform.system()]:
|
||
|
- if os.path.exists(lib_path):
|
||
|
- return lib_path
|
||
|
- if platform.system() == 'Linux' and 'LD_LIBRARY_PATH' in os.environ:
|
||
|
- ld_library_path = os.environ['LD_LIBRARY_PATH']
|
||
|
- for path in ld_library_path.split(':'):
|
||
|
- lib_path = os.path.join(path, 'libturbojpeg.so.0')
|
||
|
- if os.path.exists(lib_path):
|
||
|
- return lib_path
|
||
|
- raise RuntimeError(
|
||
|
- 'Unable to locate turbojpeg library automatically. '
|
||
|
- 'You may specify the turbojpeg library path manually.\n'
|
||
|
- 'e.g. jpeg = TurboJPEG(lib_path)')
|
||
|
+ return '@libturbojpeg@'
|
||
|
|
||
|
def __getaddr(self, nda):
|
||
|
"""returns the memory address for a given ndarray"""
|