File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -166,6 +166,35 @@ def find_library(name):
166166 res .sort (key = _num_version )
167167 return res [- 1 ]
168168
169+ elif sys .platform == "sunos5" :
170+
171+ def _findLib_crle (name , is64 ):
172+ if not os .path .exists ('/usr/bin/crle' ):
173+ return None
174+
175+ if is64 :
176+ cmd = 'env LC_ALL=C /usr/bin/crle -64 2>/dev/null'
177+ else :
178+ cmd = 'env LC_ALL=C /usr/bin/crle 2>/dev/null'
179+
180+ for line in os .popen (cmd ).readlines ():
181+ line = line .strip ()
182+ if line .startswith ('Default Library Path (ELF):' ):
183+ paths = line .split ()[4 ]
184+
185+ if not paths :
186+ return None
187+
188+ for dir in paths .split (":" ):
189+ libfile = os .path .join (dir , "lib%s.so" % name )
190+ if os .path .exists (libfile ):
191+ return libfile
192+
193+ return None
194+
195+ def find_library (name , is64 = False ):
196+ return _get_soname (_findLib_crle (name , is64 ) or _findLib_gcc (name ))
197+
169198 else :
170199
171200 def _findSoname_ldconfig (name ):
Original file line number Diff line number Diff line change @@ -1250,6 +1250,7 @@ Richard Walker
12501250Larry Wall
12511251Kevin Walzer
12521252Rodrigo Steinmuller Wanderley
1253+ Ke Wang
12531254Greg Ward
12541255Zachary Ware
12551256Barry Warsaw
Original file line number Diff line number Diff line change @@ -163,6 +163,8 @@ Core and Builtins
163163Library
164164-------
165165
166+ - Issue #5289: Fix ctypes.util.find_library on Solaris.
167+
166168- Issue #17106: Fix a segmentation fault in io.TextIOWrapper when an underlying
167169 stream or a decoder produces data of an unexpected type (i.e. when
168170 io.TextIOWrapper initialized with text stream or use bytes-to-bytes codec).
You can’t perform that action at this time.
0 commit comments