]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-102255: Improve build support for Windows API partitions (GH-102256)
authorMax Bachmann <oss@maxbachmann.de>
Thu, 9 Mar 2023 21:09:12 +0000 (22:09 +0100)
committerGitHub <noreply@github.com>
Thu, 9 Mar 2023 21:09:12 +0000 (21:09 +0000)
commitc6858d1e7f4cd3184d5ddea4025ad5dfc7596546
tree6c5261397eca871567bb29b31cfe02c92f6d3b58
parentca066bdbed85094a9c4d9930823ce3587807db48
gh-102255: Improve build support for Windows API partitions (GH-102256)

Add `MS_WINDOWS_DESKTOP`, `MS_WINDOWS_APPS`, `MS_WINDOWS_SYSTEM` and `MS_WINDOWS_GAMES` preprocessor definitions to allow switching off functionality missing from particular API partitions ("partitions" are used in Windows to identify overlapping subsets of APIs).
CPython only officially supports `MS_WINDOWS_DESKTOP` and `MS_WINDOWS_SYSTEM` (APPS is included by normal desktop builds, but APPS without DESKTOP is not covered). Other configurations are a convenience for people building their own runtimes.
`MS_WINDOWS_GAMES` is for the Xbox subset of the Windows API, which is also available on client OS, but is restricted compared to `MS_WINDOWS_DESKTOP`. These restrictions may change over time, as they relate to the build headers rather than the OS support, and so we assume that Xbox builds will use the latest available version of the GDK.
36 files changed:
Include/internal/pycore_fileutils.h
Lib/test/test_os.py
Misc/NEWS.d/next/Core and Builtins/2023-02-26-11-43-56.gh-issue-102255.cRnI5x.rst [new file with mode: 0644]
Modules/_io/_iomodule.c
Modules/_io/_iomodule.h
Modules/_io/clinic/winconsoleio.c.h
Modules/_io/fileio.c
Modules/_io/winconsoleio.c
Modules/_localemodule.c
Modules/_multiprocessing/multiprocessing.h
Modules/_pickle.c
Modules/_randommodule.c
Modules/_ssl.c
Modules/_winapi.c
Modules/clinic/posixmodule.c.h
Modules/errnomodule.c
Modules/faulthandler.c
Modules/getpath.c
Modules/mmapmodule.c
Modules/posixmodule.c
Modules/selectmodule.c
Modules/socketmodule.c
Modules/timemodule.c
Objects/obmalloc.c
PC/clinic/msvcrtmodule.c.h
PC/clinic/winreg.c.h
PC/config.c
PC/config_minimal.c
PC/msvcrtmodule.c
PC/pyconfig.h
PC/winreg.c
Parser/myreadline.c
Python/dynload_win.c
Python/fileutils.c
Python/pylifecycle.c
Python/sysmodule.c