File tree 1 file changed +5
-1
lines changed 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,7 @@ def find_python_dll():
250
250
# - in system32,
251
251
# - ortherwise (Sxs), I don't know how to get it.
252
252
lib_dirs = []
253
+ lib_dirs .append (sys .prefix )
253
254
lib_dirs .append (os .path .join (sys .prefix , 'lib' ))
254
255
try :
255
256
lib_dirs .append (os .path .join (os .environ ['SYSTEMROOT' ], 'system32' ))
@@ -302,13 +303,16 @@ def generate_def(dll, dfile):
302
303
303
304
def find_dll (dll_name ):
304
305
306
+ arch = {'AMD64' : 'amd64' ,
307
+ 'Intel' : 'x86' }[get_build_architecture ()]
308
+
305
309
def _find_dll_in_winsxs (dll_name ):
306
310
# Walk through the WinSxS directory to find the dll.
307
311
winsxs_path = os .path .join (os .environ ['WINDIR' ], 'winsxs' )
308
312
if not os .path .exists (winsxs_path ):
309
313
return None
310
314
for root , dirs , files in os .walk (winsxs_path ):
311
- if dll_name in files :
315
+ if dll_name in files and arch in root :
312
316
return os .path .join (root , dll_name )
313
317
return None
314
318
You can’t perform that action at this time.
0 commit comments