8000 gh-124487: Require at least Windows 10 SDK and for install by zooba · Pull Request #124672 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-124487: Require at least Windows 10 SDK and for install #124672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load 8000 comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Increases Windows required OS and API level to Windows 10.
6 changes: 3 additions & 3 deletions PC/pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ WIN32 is still required for the locale module.
#endif /* MS_WIN64 */

/* set the version macros for the windows headers */
/* Python 3.9+ requires Windows 8 or greater */
#define Py_WINVER 0x0602 /* _WIN32_WINNT_WIN8 */
#define Py_NTDDI NTDDI_WIN8
/* Python 3.13+ requires Windows 10 or greater */
#define Py_WINVER 0x0A00 /* _WIN32_WINNT_WIN10 */
#define Py_NTDDI NTDDI_WIN10

/* We only set these values when building Python - we don't want to force
these values on extensions, as that will affect the prototypes and
Expand Down
2 changes: 1 addition & 1 deletion Tools/msi/bundle/Default.wxl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Feel free to post at <a href="https://discuss.python.org/c/users/7">discus
<String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
<String Id="FailureRestartButton">&amp;Restart</String>
<String Id="FailureExistingInstall">Unable to install [WixBundleName] due to an existing install. Use Programs and Features to modify, repair or remove [WixBundleName].</String>
<String Id="FailureOldOS">At least Windows 8.1 or Windows Server 2012 are required to install [WixBundleName]
<String Id="FailureOldOS">At least Windows 10 or Windows Server 2016 are required to install [WixBundleName]

Visit &lt;a href="https://www.python.org/downloads/"&gt;python.org&lt;/a&gt; to download an earlier version of Python.</String>
<String Id="SuccessMaxPathButton">Disable path length limit</String>
Expand Down
11 changes: 6 additions & 5 deletions Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3086,11 +3086,13 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
LOC_STRING *pLocString = nullptr;

if (IsWindowsServer()) {
if (IsWindowsVersionOrGreater(6, 2, 0)) {
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows Server 2012 or later");
if (IsWindowsVersionOrGreater(10, 0, 0)) {
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows Server 2016 or later");
return;
} else if (IsWindowsVersionOrGreater(6, 2, 0)) {
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2012");
} else if (IsWindowsVersionOrGreater(6, 1, 1)) {
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Detected Windows Server 2008 R2");
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008 R2");
} else if (IsWindowsVersionOrGreater(6, 1, 0)) {
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008 R2");
} else if (IsWindowsVersionOrGreater(6, 0, 0)) {
Expand All @@ -3104,8 +3106,7 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 10 or later");
return;
} else if (IsWindows8Point1OrGreater()) {
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 8.1");
return;
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 8.1");
} else if (IsWindows8OrGreater()) {
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 8");
} else if (IsWindows7OrGreater()) {
Expand Down
Loading
0