]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45220: Avoid automatically selecting the Windows 11 SDK preview when building...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 29 Sep 2021 13:54:47 +0000 (06:54 -0700)
committerGitHub <noreply@github.com>
Wed, 29 Sep 2021 13:54:47 +0000 (15:54 +0200)
(cherry picked from commit f4b94b1f57827083990272b5f282aa1493ae2bf4)

Co-authored-by: Steve Dower <steve.dower@python.org>
Misc/NEWS.d/next/Build/2021-09-16-18-00-43.bpo-45220.TgbkvW.rst [new file with mode: 0644]
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 (file)
index 0000000..8bbd634
--- /dev/null
@@ -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.
index 295b7293f9d7bba144cc613ed133965a67398848..0d25e51126a714d16c1a20041ef6f89b6e8593a7 100644 (file)
     <!-- 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="$([System.Version]::Parse($(_RegistryVersion))) > $([System.Version]::Parse($(DefaultWindowsSDKVersion)))">$(_RegistryVersion)</DefaultWindowsSDKVersion>