summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-02-04 00:26:51 (GMT)
committerBenjamin Peterson <benjamin@python.org>2013-02-04 00:26:51 (GMT)
commitd41e01dfb56c28176665b7deef256d0cd5266708 (patch)
treeae697281bd78d0ea6eec12cbc1179dea9ec14dd9
parentc0b631c0c475a4985616ee87ecddf4389e9230e0 (diff)
parentcfe34744e3c785a56525ab8a9473336206f5854d (diff)
downloadcpython-d41e01dfb56c28176665b7deef256d0cd5266708.zip
cpython-d41e01dfb56c28176665b7deef256d0cd5266708.tar.gz
cpython-d41e01dfb56c28176665b7deef256d0cd5266708.tar.bz2
merge 3.3 (#5289)
-rw-r--r--Lib/ctypes/util.py29
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS2
3 files changed, 32 insertions, 0 deletions
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
index 5555b2e..1515604 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -166,6 +166,35 @@ elif os.name == "posix":
res.sort(key=_num_version)
return res[-1]
+ elif sys.platform == "sunos5":
+
+ def _findLib_crle(name, is64):
+ if not os.path.exists('/usr/bin/crle'):
+ return None
+
+ if is64:
+ cmd = 'env LC_ALL=C /usr/bin/crle -64 2>/dev/null'
+ else:
+ cmd = 'env LC_ALL=C /usr/bin/crle 2>/dev/null'
+
+ for line in os.popen(cmd).readlines():
+ line = line.strip()
+ if line.startswith('Default Library Path (ELF):'):
+ paths = line.split()[4]
+
+ if not paths:
+ return None
+
+ for dir in paths.split(":"):
+ libfile = os.path.join(dir, "lib%s.so" % name)
+ if os.path.exists(libfile):
+ return libfile
+
+ return None
+
+ def find_library(name, is64 = False):
+ return _get_soname(_findLib_crle(name, is64) or _findLib_gcc(name))
+
else:
def _findSoname_ldconfig(name):
diff --git a/Misc/ACKS b/Misc/ACKS
index 7e121b1..0ab3a52 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1263,6 +1263,7 @@ Richard Walker
Larry Wall
Kevin Walzer
Rodrigo Steinmuller Wanderley
+Ke Wang
Greg Ward
Zachary Ware
Barry Warsaw
diff --git a/Misc/NEWS b/Misc/NEWS
index 71bd91a..6f62599 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -235,6 +235,8 @@ Core and Builtins
Library
-------
+- Issue #5289: Fix ctypes.util.find_library on Solaris.
+
- Issue #17106: Fix a segmentation fault in io.TextIOWrapper when an underlying
stream or a decoder produces data of an unexpected type (i.e. when
io.TextIOWrapper initialized with text stream or use bytes-to-bytes codec).