[Python-checkins] bpo-35699: fix distuils cannot detect Build Tools 2017 anymore (GH-11495)

Miss Islington (bot) webhook-mailer at python.org
Sun Jan 20 14:06:11 EST 2019


https://github.com/python/cpython/commit/2fa53cfa8960f4bcb36718da4424e980fc305ef5
commit: 2fa53cfa8960f4bcb36718da4424e980fc305ef5
branch: 3.7
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-01-20T11:06:08-08:00
summary:

bpo-35699: fix distuils cannot detect Build Tools 2017 anymore (GH-11495)

(cherry picked from commit b2dc4a3313c236fedbd6df664722cd47f3d91a72)

Co-authored-by: Marc Schlaich <marc.schlaich at googlemail.com>

files:
A Misc/NEWS.d/next/Library/2019-01-11-07-09-25.bpo-35699.VDiENF.rst
M Lib/distutils/_msvccompiler.py

diff --git a/Lib/distutils/_msvccompiler.py b/Lib/distutils/_msvccompiler.py
index 84b4ef59599d..58b20a210247 100644
--- a/Lib/distutils/_msvccompiler.py
+++ b/Lib/distutils/_msvccompiler.py
@@ -78,6 +78,7 @@ def _find_vc2017():
             "-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
diff --git a/Misc/NEWS.d/next/Library/2019-01-11-07-09-25.bpo-35699.VDiENF.rst b/Misc/NEWS.d/next/Library/2019-01-11-07-09-25.bpo-35699.VDiENF.rst
new file mode 100644
index 000000000000..e632e7bdcffe
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2019-01-11-07-09-25.bpo-35699.VDiENF.rst
@@ -0,0 +1 @@
+Fixed detection of Visual Studio Build Tools 2017 in distutils
\ No newline at end of file



More information about the Python-checkins mailing list