mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
bpo-43298: Improved error message when building without the Windows SDK installed (GH-26800) (#26803)
(cherry picked from commit 80190b3e53
)
Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
parent
6fb4248cd9
commit
e7009f4f9a
2 changed files with 13 additions and 3 deletions
|
@ -109,9 +109,18 @@
|
|||
|
||||
<!-- 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>
|
||||
<DefaultWindowsSDKVersion Condition="$(_RegistryVersion) != '' and $([System.Version]::Parse($(_RegistryVersion))) > $([System.Version]::Parse($(DefaultWindowsSDKVersion)))">$(_RegistryVersion)</DefaultWindowsSDKVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Target Name="_CheckWindowsSDKFound" BeforeTargets="_CheckWindowsSDKInstalled" Condition="$(_RegistryVersion) == ''">
|
||||
<PropertyGroup>
|
||||
<_Message>Failed to locate a Windows SDK installation.</_Message>
|
||||
<_Message>$(_Message) If the build fails, please use the Visual Studio Installer to install the Windows SDK.</_Message>
|
||||
<_Message>$(_Message) (Ignore the version number specified in the error message and select the latest.)</_Message>
|
||||
</PropertyGroup>
|
||||
<Warning Text="$(_Message)" />
|
||||
</Target>
|
||||
|
||||
<PropertyGroup Condition="$(WindowsTargetPlatformVersion) == ''">
|
||||
<WindowsTargetPlatformVersion>$(DefaultWindowsSDKVersion)</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
@ -176,7 +185,7 @@
|
|||
<ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'b'">11</ReleaseLevelNumber>
|
||||
<ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'rc'">12</ReleaseLevelNumber>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<PythonVersionNumber>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</PythonVersionNumber>
|
||||
<PythonVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)$(ReleaseLevelName)</PythonVersion>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue