[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFS: assimp



* IOhannes zmölnig <zmoelnig@iem.at>, 2011-08-19, 15:45:
pyassimp.errors.AssimpError: assimp library not found
hmm, it worked for me...:-(
trying to find words to ask you how and what, i think i found the reason: pyassimp looks for /usr/lib/libassimp.so which is only provided by libassimp-dev (which i most likely had installed when testing) since the findmechanism in pyassimp for dlopen() is rather simplistic, i guess this is the reason why it fails.

thanks for pointing that out.

Yeah, the whole search_library() function could be replaced by a simple:

    return ctypes.cdll.LoadLibrary('libassimp.so.2')

(Well, modulo support for non-UNIX-y operating systems.)

yes, i came up with something equivalent (though not checked in yet), but also using
  ctypes.util.find_library('assimp')
to resolve "libassimp.so.2" dynamically.

But why? The Python code has hardcoded assumptions about the library ABI, so you should open libassimp.so.2, not any other libassimp.so.N (which ABI might be different).

since i am no python programmer, i wonder whether this is portable (w32, osx)

AFAICT ctypes.util.find_library is implemented for all platform, though using it is almost always bad idea.

Also, why did it print stuff on stdout? :/
ask upstream :-)
...
no, seriously.

Well, I have no interest in your package, I don't even know what it's all about. I was just (implicitly) asked by Michael to review the Python part of it, so I did.

--
Jakub Wilk


Reply to: