Merge pull request #2035 from mr-ravin/master

Solved pyassimp.errors.AssimpError in conda
pull/2020/head^2
Kim Kulling 2018-06-22 19:32:08 +02:00 committed by GitHub
commit 41be5400bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 5 deletions

View File

@ -27,7 +27,7 @@ additional_dirs, ext_whitelist = [],[]
if os.name=='posix':
additional_dirs.append('./')
additional_dirs.append('/usr/lib/')
additional_dirs.append('/usr/lib/x86_64-linux-gnu')
additional_dirs.append('/usr/lib/x86_64-linux-gnu/')
additional_dirs.append('/usr/local/lib/')
if 'LD_LIBRARY_PATH' in os.environ:
@ -222,11 +222,17 @@ def search_library():
for filename in os.listdir(curfolder):
# our minimum requirement for candidates is that
# they should contain 'assimp' somewhere in
# their name
if filename.lower().find('assimp')==-1 or\
os.path.splitext(filename)[-1].lower() not in ext_whitelist:
# their name
if filename.lower().find('assimp')==-1 :
continue
is_out=1
for et in ext_whitelist:
if et in filename.lower():
is_out=0
break
if is_out:
continue
library_path = os.path.join(curfolder, filename)
logger.debug('Try ' + library_path)
try: