[issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX)

aixtools report at bugs.python.org
Sat Jun 11 10:52:47 EDT 2016


aixtools added the comment:

On 6/10/2016 6:33 AM, Martin Panter wrote:
> Martin Panter added the comment:
>
> Will try to change the existing code from os.popen to subprocess (Issue 26439) to set a better example for new code like this
>
> ----------
> dependencies: +avoid using a shell in ctypes.util: replace os.popen with subprocess
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue26439>
> _______________________________________

I have added comments to _aixutil.py - but while doing so I came up with 
some thoughts re "special cases", where

a) the member is not in a archive (i.e., looking for a file)

b) the filename does not begin with "lib"

c) CDLL.LoadLibrary(name) succeeds

So, given that /usr/lib is default search path, and file FOO.so exists 
as /usr/lib/FOO.so - should find_library(name) return name, or None.

d) name = ../some/where/Foo.so; CDLL.LoadLibrary("../some/where/Foo.so") 
works - should find_library(name) return name

e) assume find_library("../some/where/Foo") returns 
../some/where/libFoo.so, or None - again, given that 
../some/where/libFoo.a does not exist

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26439>
_______________________________________


More information about the Python-bugs-list mailing list