mirror of
https://github.com/python/cpython.git
synced 2025-10-28 04:04:44 +00:00
Issue #21042: Return full path in ctypes.util.find_library() on Linux
Patch by Tamás Bence Gedai.
This commit is contained in:
parent
aadaa3614e
commit
b9f3114d42
5 changed files with 37 additions and 22 deletions
|
|
@ -221,8 +221,8 @@ def _findSoname_ldconfig(name):
|
|||
abi_type = mach_map.get(machine, 'libc6')
|
||||
|
||||
# XXX assuming GLIBC's ldconfig (with option -p)
|
||||
regex = os.fsencode(
|
||||
'\s+(lib%s\.[^\s]+)\s+\(%s' % (re.escape(name), abi_type))
|
||||
regex = r'lib%s\.[^\s]+\s\(%s(?:,\s.*)?\)\s=>\s(.*)'
|
||||
regex = os.fsencode(regex % (re.escape(name), abi_type))
|
||||
try:
|
||||
with subprocess.Popen(['/sbin/ldconfig', '-p'],
|
||||
stdin=subprocess.DEVNULL,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue