Improves test_underpth_nosite_file to reveal why it fails. (#1763) · python/cpython@9b33bf5 · GitHub
Skip to content

Commit 9b33bf5

Browse files
authored
Improves test_underpth_nosite_file to reveal why it fails. (#1763)
* Improves test_underpth_nosite_file to reveal why it fails. * Enable building with Windows 10 SDK. * Fix WinSDK detection * Fix initialization on Windows when a ._pth file exists. * Fix tabs * Adds comment about Py_GetPath call.
1 parent 66dc33b commit 9b33bf5

3 files changed

Lines changed: 31 additions & 7 deletions

File tree

Lib/test/test_site.py

Lines changed: 10 additions & 6 deletions

PCbuild/python.props

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,21 @@
6363
<PythonExe Condition="'$(PythonExe)' == ''">$(BuildPath)python$(PyDebugExt).exe</PythonExe>
6464
</PropertyGroup>
6565

66+
<PropertyGroup Condition="$(DefaultWindowsSDKVersion) == ''">
67+
<!--
68+
Attempt to select the latest installed WinSDK. If we don't find any, then we will
69+
let the MSBuild targets determine which one it wants to use (typically the earliest
70+
possible version). Since we limit WINVER to Windows 7 anyway, it doesn't really
71+
matter which WinSDK version we use.
72+
-->
73+
<DefaultWindowsSDKVersion Condition="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) == '10.0.15063'">10.0.15063.0</DefaultWindowsSDKVersion>
74+
<DefaultWindowsSDKVersion Condition="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) == '10.0.15063'">10.0.15063.0</DefaultWindowsSDKVersion>
75+
<DefaultWindowsSDKVersion Condition="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) == '10.0.10586'">10.0.10586.0</DefaultWindowsSDKVersion>
76+
<DefaultWindowsSDKVersion Condition="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) == '10.0.10586'">10.0.10586.0</DefaultWindowsSDKVersion>
77+
<DefaultWindowsSDKVersion Condition="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) == '10.0.10240'">10.0.10240.0</DefaultWindowsSDKVersion>
78+
<DefaultWindowsSDKVersion Condition="$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) == '10.0.10240'">10.0.10240.0</DefaultWindowsSDKVersion>
79+
</PropertyGroup>
80+
6681
<PropertyGroup Condition="'$(OverrideVersion)' == ''">
6782
<!--
6883
Read version information from Include\patchlevel.h. The following properties are set:

Python/pylifecycle.c

Lines changed: 6 additions & 1 deletion

0 commit comments

Comments
 (0)