ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / pyturbojpeg / lib-path.patch
blob30e6ed58bac753213fcf96711eef92ff6b22752e
1 diff --git a/turbojpeg.py b/turbojpeg.py
2 index 73edb38..bfa8c67 100644
3 --- a/turbojpeg.py
4 +++ b/turbojpeg.py
5 @@ -408,22 +408,7 @@ class TurboJPEG(object):
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@'
27 def __getaddr(self, nda):
28 """returns the memory address for a given ndarray"""