[Python-checkins] bpo-45220: Avoid automatically selecting the Windows 11 SDK preview when building (GH-28393) (GH-28394)

serhiy-storchaka webhook-mailer at python.org
Thu Sep 16 15:47:14 EDT 2021


https://github.com/python/cpython/commit/f798cef8aaaa7faeb428bdb9ebf73df1a6146304
commit: f798cef8aaaa7faeb428bdb9ebf73df1a6146304
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: serhiy-storchaka <storchaka at gmail.com>
date: 2021-09-16T22:47:09+03:00
summary:

bpo-45220: Avoid automatically selecting the Windows 11 SDK preview when building (GH-28393) (GH-28394)

(cherry picked from commit f4b94b1f57827083990272b5f282aa1493ae2bf4)

Co-authored-by: Steve Dower <steve.dower at python.org>

files:
A Misc/NEWS.d/next/Build/2021-09-16-18-00-43.bpo-45220.TgbkvW.rst
M PCbuild/python.props

diff --git a/Misc/NEWS.d/next/Build/2021-09-16-18-00-43.bpo-45220.TgbkvW.rst b/Misc/NEWS.d/next/Build/2021-09-16-18-00-43.bpo-45220.TgbkvW.rst
new file mode 100644
index 0000000000000..8bbd634fa61a3
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2021-09-16-18-00-43.bpo-45220.TgbkvW.rst
@@ -0,0 +1,3 @@
+Avoid building with the Windows 11 SDK previews automatically. This may be
+overridden by setting the ``DefaultWindowsSDKVersion`` environment variable
+before building.
diff --git a/PCbuild/python.props b/PCbuild/python.props
index 42c67de4afa34..888de37caaa25 100644
--- a/PCbuild/python.props
+++ b/PCbuild/python.props
@@ -107,6 +107,9 @@
     <!-- Sometimes the version in the registry has to .0 suffix, and sometimes it doesn't. Check and add it -->
     <_RegistryVersion Condition="$(_RegistryVersion) != '' and !$(_RegistryVersion.EndsWith('.0'))">$(_RegistryVersion).0</_RegistryVersion>
 
+    <!-- Avoid upgrading to Windows 11 SDK for now, but assume the latest Win10 SDK is installed -->
+    <_RegistryVersion Condition="$([System.Version]::Parse($(_RegistryVersion))) >= $([System.Version]::Parse(`10.0.22000.0`))">10.0.19041.0</_RegistryVersion>
+
     <!-- The minimum allowed SDK version to use for building -->
     <DefaultWindowsSDKVersion>10.0.10586.0</DefaultWindowsSDKVersion>
     <DefaultWindowsSDKVersion Condition="$(_RegistryVersion) != '' and $([System.Version]::Parse($(_RegistryVersion))) > $([System.Version]::Parse($(DefaultWindowsSDKVersion)))">$(_RegistryVersion)</DefaultWindowsSDKVersion>



More information about the Python-checkins mailing list