[pyassimp] Add /usr/lib to the path where to look for libassimp
parent
848c875ec2
commit
bed0e4e83f
|
@ -17,6 +17,7 @@ additional_dirs, ext_whitelist = [],[]
|
||||||
# populate search directories and lists of allowed file extensions
|
# populate search directories and lists of allowed file extensions
|
||||||
# depending on the platform we're running on.
|
# depending on the platform we're running on.
|
||||||
if os.name=='posix':
|
if os.name=='posix':
|
||||||
|
additional_dirs.append('/usr/lib/')
|
||||||
additional_dirs.append('/usr/local/lib/')
|
additional_dirs.append('/usr/local/lib/')
|
||||||
|
|
||||||
# note - this won't catch libassimp.so.N.n, but
|
# note - this won't catch libassimp.so.N.n, but
|
||||||
|
@ -27,7 +28,7 @@ if os.name=='posix':
|
||||||
elif os.name=='nt':
|
elif os.name=='nt':
|
||||||
ext_whitelist.append('.dll')
|
ext_whitelist.append('.dll')
|
||||||
|
|
||||||
print(additional_dirs)
|
#print(additional_dirs)
|
||||||
def vec2tuple(x):
|
def vec2tuple(x):
|
||||||
""" Converts a VECTOR3D to a Tuple """
|
""" Converts a VECTOR3D to a Tuple """
|
||||||
return (x.x, x.y, x.z)
|
return (x.x, x.y, x.z)
|
||||||
|
@ -88,7 +89,7 @@ def search_library():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
library = os.path.join(curfolder, filename)
|
library = os.path.join(curfolder, filename)
|
||||||
print 'Try ',library
|
#print 'Try ',library
|
||||||
try:
|
try:
|
||||||
dll = ctypes.cdll.LoadLibrary(library)
|
dll = ctypes.cdll.LoadLibrary(library)
|
||||||
except:
|
except:
|
||||||
|
@ -105,7 +106,7 @@ def search_library():
|
||||||
# get the newest library
|
# get the newest library
|
||||||
candidates = map(lambda x: (os.lstat(x[0])[-2], x), candidates)
|
candidates = map(lambda x: (os.lstat(x[0])[-2], x), candidates)
|
||||||
res = max(candidates, key=operator.itemgetter(0))[1]
|
res = max(candidates, key=operator.itemgetter(0))[1]
|
||||||
print 'Taking ',res[0]
|
#print 'Taking ',res[0]
|
||||||
|
|
||||||
# XXX: if there are 1000 dll/so files containing 'assimp'
|
# XXX: if there are 1000 dll/so files containing 'assimp'
|
||||||
# in their name, do we have all of them in our address
|
# in their name, do we have all of them in our address
|
||||||
|
|
Loading…
Reference in New Issue