File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,12 +102,5 @@ def test_1703286_B(self):
102102 # This is the real test: call the function via 'call_function'
103103 self .assertEqual (0 , call_function (proc , (None ,)))
104104
105- if os .name != "nt" :
106- def test_libc_exists (self ):
107- # A basic test that the libc is found by find_library()
108- # XXX Can this fail on some non-Windows systems?
109- self .assertTrue (libc_name )
110- self .assertTrue (os .path .exists (libc_name ))
111-
112105if __name__ == "__main__" :
113106 unittest .main ()
Original file line number Diff line number Diff line change @@ -203,18 +203,14 @@ def _findSoname_ldconfig(name):
203203 abi_type = mach_map .get (machine , 'libc6' )
204204
205205 # XXX assuming GLIBC's ldconfig (with option -p)
206- name = ' lib%s' % name
207- pat = re . compile ( '\s*(/[^\(\)\s]*%s\.[^\(\)\s]*)' % re .escape (name ))
206+ expr = r'(\S+)\s+\((%s(?:, OS ABI:[^\)]*)?)\)[^/]*(/[^\(\)\s]* lib%s\.[^\(\)\s]*)' \
207+ % ( abi_type , re .escape (name ))
208208 with contextlib .closing (os .popen ('LC_ALL=C LANG=C /sbin/ldconfig -p 2>/dev/null' )) as f :
209- for line in f :
210- if not '=>' in line :
211- continue
212- path = line .rsplit ('=>' , 1 )[1 ]
213- if not name + '.' in path :
214- continue
215- res = pat .search (path )
216- if res :
217- return res .group (1 )
209+ data = f .read ()
210+ res = re .search (expr , data )
211+ if not res :
212+ return None
213+ return res .group (1 )
218214
219215 def find_library (name ):
220216 return _findSoname_ldconfig (name ) or _get_soname (_findLib_gcc (name ))
Original file line number Diff line number Diff line change @@ -329,7 +329,6 @@ Dag Gruneau
329329Michael Guravage
330330Lars Gustäbel
331331Thomas Güttler
332- Jonas H.
333332Barry Haddow
334333Paul ten Hagen
335334Rasmus Hahn
Original file line number Diff line number Diff line change @@ -35,9 +35,6 @@ Core and Builtins
3535Library
3636-------
3737
38- - Issue #11258: Speed up ctypes.util.find_library() under Linux a lot. Patch
39- by Jonas H.
40-
4138- Issue #11297: Add collections.ChainMap().
4239
4340- Issue #10755: Add the posix.fdlistdir() function. Patch by Ross Lagerwall.
You can’t perform that action at this time.
0 commit comments