mirror of https://github.com/python/cpython
Get ctypes loader working on OSF1 (Tru64)
This commit is contained in:
parent
cbce280d4f
commit
b0b20a10bc
|
@ -56,7 +56,10 @@ elif os.name == "posix":
|
||||||
expr = '/[^\(\)\s]*lib%s\.[^\(\)\s]*' % name
|
expr = '/[^\(\)\s]*lib%s\.[^\(\)\s]*' % name
|
||||||
res = re.search(expr, os.popen('/sbin/ldconfig -p 2>/dev/null').read())
|
res = re.search(expr, os.popen('/sbin/ldconfig -p 2>/dev/null').read())
|
||||||
if not res:
|
if not res:
|
||||||
return None
|
cmd = 'ldd %s 2>/dev/null' % sys.executable
|
||||||
|
res = re.search(expr, os.popen(cmd).read())
|
||||||
|
if not res:
|
||||||
|
return None
|
||||||
return res.group(0)
|
return res.group(0)
|
||||||
|
|
||||||
def _get_soname(f):
|
def _get_soname(f):
|
||||||
|
|
|
@ -15,7 +15,7 @@ class LoaderTest(unittest.TestCase):
|
||||||
name = "libc.dylib"
|
name = "libc.dylib"
|
||||||
elif sys.platform.startswith("freebsd"):
|
elif sys.platform.startswith("freebsd"):
|
||||||
name = "libc.so"
|
name = "libc.so"
|
||||||
elif sys.platform == "sunos5":
|
elif sys.platform in ("sunos5", "osf1V5"):
|
||||||
name = "libc.so"
|
name = "libc.so"
|
||||||
elif sys.platform.startswith("netbsd") or sys.platform.startswith("openbsd"):
|
elif sys.platform.startswith("netbsd") or sys.platform.startswith("openbsd"):
|
||||||
name = "libc.so"
|
name = "libc.so"
|
||||||
|
|
Loading…
Reference in New Issue