[issue19317] ctypes.util.find_library should examine binary's RPATH on Solaris
Martin Panter
report at bugs.python.org
Thu Apr 28 02:43:36 EDT 2016
Martin Panter added the comment:
I am realizing that many people like to use find_library() as a way of converting a portable name like “magic” (from building with -lmagic) into a platform-specific name (libmagic.so.1, libmagic.dylib, magic.dll, etc), and then pass this to LoadLibrary() or equivalent. So searching Python’s runpath would probably be valid for that use case.
IMO the extra searching is inefficient, and not robust if there is more than one version of the library. Personally I would be more interested in adding an alternative function, maybe make_library_name("magic", "1") -> "libmagic.so.1", or cdll.LoadLibraryByPortableName("magic", "1").
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19317>
_______________________________________
More information about the Python-bugs-list
mailing list