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 8b33961 commit af56c4fCopy full SHA for af56c4f
Lib/test/support/__init__.py
@@ -1673,9 +1673,15 @@ def missing_compiler_executable(cmd_names=[]):
1673
missing.
1674
1675
"""
1676
- from distutils import ccompiler, sysconfig, spawn
+ from distutils import ccompiler, sysconfig, spawn, errors
1677
compiler = ccompiler.new_compiler()
1678
sysconfig.customize_compiler(compiler)
1679
+ if compiler.compiler_type == "msvc":
1680
+ # MSVC has no executables, so check whether initialization succeeds
1681
+ try:
1682
+ compiler.initialize()
1683
+ except errors.DistutilsPlatformError:
1684
+ return "msvc"
1685
for name in compiler.executables:
1686
if cmd_names and name not in cmd_names:
1687
continue
0 commit comments