Skip to content

Commit 06121dc

Browse files
committed
windows: limit vswhere to VS2017
Because we have a "15.0" hardcoded in here. Picking up VS2019 will confuse things.
1 parent 29c64c0 commit 06121dc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cpython-windows/build.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@ def find_msbuild():
118118
print('%s does not exist' % vswhere)
119119
sys.exit(1)
120120

121-
p = subprocess.check_output([str(vswhere), '-latest', '-property', 'installationPath', '-products', '*'])
121+
p = subprocess.check_output([
122+
str(vswhere),
123+
# Visual Studio 2017.
124+
'-version', '[15,16)',
125+
'-property', 'installationPath', '-products', '*'])
122126

123127
# Strictly speaking the output may not be UTF-8.
124128
p = pathlib.Path(p.strip().decode('utf-8'))

0 commit comments

Comments
 (0)