bpo-35699: fix distuils cannot detect Build Tools 2017 anymore (GH-11495)
(cherry picked from commit b2dc4a3313c236fedbd6df664722cd47f3d91a72)
Co-authored-by: Marc Schlaich <marc.schlaich@googlemail.com>
diff --git a/Lib/distutils/_msvccompiler.py b/Lib/distutils/_msvccompiler.py
index 84b4ef5..58b20a2 100644
--- a/Lib/distutils/_msvccompiler.py
+++ b/Lib/distutils/_msvccompiler.py
@@ -78,6 +78,7 @@
"-prerelease",
"-requires", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"-property", "installationPath",
+ "-products", "*",
], encoding="mbcs", errors="strict").strip()
except (subprocess.CalledProcessError, OSError, UnicodeDecodeError):
return None, None