mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-07 17:03:12 +08:00
ENH: Also scan /home/stefan/lib for freeimage.so.
This commit is contained in:
@@ -5,12 +5,15 @@ import os
|
||||
|
||||
from numpy.compat import asbytes
|
||||
|
||||
lib_dirs = (os.path.dirname(__file__),
|
||||
lib_dirs = [os.path.dirname(__file__),
|
||||
'/lib',
|
||||
'/usr/lib',
|
||||
'/usr/local/lib',
|
||||
'/opt/local/lib',
|
||||
)
|
||||
]
|
||||
|
||||
if 'HOME' in os.environ:
|
||||
lib_dirs.append(os.path.join(os.environ['HOME'], 'lib'))
|
||||
|
||||
API = {
|
||||
'FreeImage_Load': (ctypes.c_voidp,
|
||||
@@ -38,7 +41,8 @@ def register_api(lib,api):
|
||||
|
||||
_FI = None
|
||||
for d in lib_dirs:
|
||||
for libname in ('FreeImage.dll', 'libfreeimage', 'libFreeImage'):
|
||||
for libname in ('freeimage', 'FreeImage',
|
||||
'libfreeimage', 'libFreeImage'):
|
||||
try:
|
||||
_FI = numpy.ctypeslib.load_library(libname, d)
|
||||
except OSError:
|
||||
|
||||
Reference in New Issue
Block a user