File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -2289,10 +2289,25 @@ def generate_config_py(target):
2289
2289
2290
2290
# For gfortran+msvc combination, extra shared libraries may exist
2291
2291
f .write ("""
2292
+
2292
2293
import os
2293
- extra_dll_dir = os.path.join(os.path.dirname(__file__), '.libs')
2294
- if os.path.isdir(extra_dll_dir):
2295
- os.environ["PATH"] += os.pathsep + extra_dll_dir
2294
+ import sys
2295
+
2296
+ extra_dll_dir = os.path.join(os.path.dirname(__file__), 'extra-dll')
2297
+
2298
+ if os.path.isdir(extra_dll_dir) and sys.platform == 'win32':
2299
+ try:
2300
+ from ctypes import windll, c_wchar_p
2301
+ _AddDllDirectory = windll.kernel32.AddDllDirectory
2302
+ _AddDllDirectory.argtypes = [c_wchar_p]
2303
+ # Needed to initialize AddDllDirectory modifications
2304
+ windll.kernel32.SetDefaultDllDirectories(0x1000)
2305
+ except AttributeError:
2306
+ def _AddDllDirectory(dll_directory):
2307
+ os.environ["PATH"] += os.pathsep + dll_directory
2308
+
2309
+ _AddDllDirectory(extra_dll_dir)
2310
+
2296
2311
""" )
2297
2312
2298
2313
for k , i in system_info .saved_results .items ():
You can’t perform that action at this time.
0 commit comments