This patch was developed in-house, but not contributed upstream because
Python 2.6 has been abandoned by the community.
--- Python-2.6.8/Lib/ctypes/util.py.~1~ 2012-04-10 08:32:04.000000000 -0700
+++ Python-2.6.8/Lib/ctypes/util.py 2015-01-20 15:17:51.156728249 -0800
@@ -164,6 +164,24 @@
res.sort(cmp= lambda x,y: cmp(_num_version(x), _num_version(y)))
return res[-1]
+ elif sys.platform == "sunos5":
+
+ def _findLib_path(name, is64):
+ if is64:
+ paths = "/lib/64:/usr/lib/64"
+ else:
+ paths = "/lib:/usr/lib"
+
+ 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_path(name, is64) or _findLib_gcc(name))
+
else:
def _findLib_ldconfig(name):