From c314ac54928f331bce52b2834aceb666373ef340 Mon Sep 17 00:00:00 2001 From: Thomas Heller Date: Mon, 19 Jun 2006 08:32:46 +0000 Subject: [PATCH] Next try to fix the OpenBSD buildbot tests: Use ctypes.util.find_library to locate the C runtime library on platforms where is returns useful results. --- Lib/ctypes/test/test_loading.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Lib/ctypes/test/test_loading.py b/Lib/ctypes/test/test_loading.py index 4841034a84..28c83fd4a9 100644 --- a/Lib/ctypes/test/test_loading.py +++ b/Lib/ctypes/test/test_loading.py @@ -9,18 +9,10 @@ if os.name == "nt": libc_name = "msvcrt" elif os.name == "ce": libc_name = "coredll" -elif sys.platform == "darwin": - libc_name = "libc.dylib" elif sys.platform == "cygwin": libc_name = "cygwin1.dll" else: - for line in os.popen("ldd %s" % sys.executable): - if "libc.so" in line: - if sys.platform.startswith("openbsd3"): - libc_name = line.split()[4] - else: - libc_name = line.split()[2] - break + libc_name = find_library("c") if is_resource_enabled("printing"): print "libc_name is", libc_name -- 2.40.0