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 b4beda1 commit c65ee55Copy full SHA for c65ee55
Lib/test/support/__init__.py
@@ -2733,9 +2733,15 @@ def missing_compiler_executable(cmd_names=[]):
2733
missing.
2734
2735
"""
2736
- from distutils import ccompiler, sysconfig, spawn
+ from distutils import ccompiler, sysconfig, spawn, errors
2737
compiler = ccompiler.new_compiler()
2738
sysconfig.customize_compiler(compiler)
2739
+ if compiler.compiler_type == "msvc":
2740
+ # MSVC has no executables, so check whether initialization succeeds
2741
+ try:
2742
+ compiler.initialize()
2743
+ except errors.DistutilsPlatformError:
2744
+ return "msvc"
2745
for name in compiler.executables:
2746
if cmd_names and name not in cmd_names:
2747
continue
0 commit comments