diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-04-03 06:52:43 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-04-03 06:52:43 (GMT) |
commit | b0b20a10bccfada2facab090a5f663028c0a8c50 (patch) | |
tree | c81650d8b4affcefd698a511ba04256f35eb1b8a | |
parent | cbce280d4f3f1c4d86a989ab85c93f13ec7e00f9 (diff) | |
download | cpython-b0b20a10bccfada2facab090a5f663028c0a8c50.zip cpython-b0b20a10bccfada2facab090a5f663028c0a8c50.tar.gz cpython-b0b20a10bccfada2facab090a5f663028c0a8c50.tar.bz2 |
Get ctypes loader working on OSF1 (Tru64)
-rw-r--r-- | Lib/ctypes/_loader.py | 5 | ||||
-rw-r--r-- | Lib/ctypes/test/test_loading.py | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Lib/ctypes/_loader.py b/Lib/ctypes/_loader.py index 7bde6c6..6ab0296 100644 --- a/Lib/ctypes/_loader.py +++ b/Lib/ctypes/_loader.py @@ -56,7 +56,10 @@ elif os.name == "posix": expr = '/[^\(\)\s]*lib%s\.[^\(\)\s]*' % name res = re.search(expr, os.popen('/sbin/ldconfig -p 2>/dev/null').read()) 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) def _get_soname(f): diff --git a/Lib/ctypes/test/test_loading.py b/Lib/ctypes/test/test_loading.py index 84e54e1..dd2886c 100644 --- a/Lib/ctypes/test/test_loading.py +++ b/Lib/ctypes/test/test_loading.py @@ -15,7 +15,7 @@ class LoaderTest(unittest.TestCase): name = "libc.dylib" elif sys.platform.startswith("freebsd"): name = "libc.so" - elif sys.platform == "sunos5": + elif sys.platform in ("sunos5", "osf1V5"): name = "libc.so" elif sys.platform.startswith("netbsd") or sys.platform.startswith("openbsd"): name = "libc.so" |