Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5e6015 commit d142564Copy full SHA for d142564
1 file changed
Lib/distutils/msvccompiler.py
@@ -474,13 +474,18 @@ def library_option (self, lib):
474
return self.library_filename (lib)
475
476
477
- def find_library_file (self, dirs, lib):
478
-
+ def find_library_file (self, dirs, lib, debug=0):
+ # Prefer a debugging library if found (and requested), but deal
479
+ # with it if we don't have one.
480
+ if debug:
481
+ try_names = [lib + "_d", lib]
482
+ else:
483
+ try_names = [lib]
484
for dir in dirs:
- libfile = os.path.join (dir, self.library_filename (lib))
- if os.path.exists (libfile):
- return libfile
485
+ for name in try_names:
486
+ libfile = os.path.join(dir, self.library_filename (name))
487
+ if os.path.exists(libfile):
488
+ return libfile
489
else:
490
# Oops, didn't find it in *any* of 'dirs'
491
return None
0 commit comments