-
Notifications
You must be signed in to change notification settings - Fork 152
Add support for building Python 3.11.x #387
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
jcfr
merged 8 commits into
python-cmake-buildsystem:master
from
jcfr:add-python-3.11-support
May 22, 2025
Merged
Add support for building Python 3.11.x #387
jcfr
merged 8 commits into
python-cmake-buildsystem:master
from
jcfr:add-python-3.11-support
May 22, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c48b9b5
to
3b92eb2
Compare
3b92eb2
to
ab98ee4
Compare
This was referenced May 16, 2025
* Add checksums for Python 3.11.0 to 3.11.12 * Set default python version to 3.11.12 * Switch from c99 to c11 * Add convenience target `deepfreeze_modules` for regenerating download the deepfreeze sources * Check that TK is at least 8.5.12 * Associate `PY3_DLLNAME` with `Python/dynload_win.c`. See python/cpython@99fcf150521 ("bpo-45582: Port getpath[p].c to Python (GH-29041)", 2021-12-03) dbm extension: * Add support for `GDBM_COMPAT` introducing `NDBM_USE` variable set to either `NDBM` or `GDBM_COMPAT`. See python/cpython@0a9f69539be ("bpo-45747: Detect gdbm/dbm dependencies in configure (GH-29467)", 2021-11-10) Updated pyconfig.h.in * Add the following for which there was already a configure check. - Headers: - `HAVE_BZLIB_H` - `HAVE_DB_H` - `HAVE_GDBM_DASH_NDBM_H` - `HAVE_GDBM_H`` - `HAVE_GDBM_NDBM_H` - `HAVE_LZMA_H` - `HAVE_NDBM_H` - `HAVE_NETDB_H` - `HAVE_NETINET_IN_H` - `HAVE_RPC_RPC_H` - `HAVE_ZLIB_H` - Library: - `HAVE_LIBDB` - `HAVE_LIBGDBM_COMPAT` - `HAVE_LIBNDBM` - `HAVE_LIBSQLITE3` Updated pyconfig.h.in and configure checks: * Add options: - `WITH_FREELISTS` set to 1 if Python 3.11 and 0 otherwise * Add header checks: - `HAVE_LINUX_LIMITS_H` - `HAVE_LINUX_SOUNDCARD_H` - `HAVE_NETCAN_CAN_H` - `HAVE_SETJMP_H` - `HAVE_SYS_SOUNDCARD_H` - `HAVE_SYSLOG_H` - `HAVE_UTMP_H` * Add symbol checks: - `HAVE_ACCEPT` - `HAVE_BIND` - `HAVE_CHMOD` - `HAVE_CLOCK_NANOSLEEP` - `HAVE_CONNECT` - `HAVE_DUP` - `HAVE_FORK1` - `HAVE_GETEGID` - `HAVE_GETEUID` - `HAVE_GETGID` - `HAVE_GETGRGID` - `HAVE_GETHOSTBYADDR` - `HAVE_GETHOSTNAME` - `HAVE_GETPPID` - `HAVE_GETPROTOBYNAME` - `HAVE_GETPWUID` - `HAVE_GETRUSAGE` - `HAVE_GETSERVBYNAME` - `HAVE_GETSERVBYPORT` - `HAVE_GETSOCKNAME` - `HAVE_GETUID` - `HAVE_INET_NTOA` - `HAVE_LISTEN` - `HAVE_LOGIN_TTY` - `HAVE_NANOSLEEP` - `HAVE_OPENDIR` - `HAVE_PIPE` - `HAVE_RECVFROM` - `HAVE_RL_COMPDISP_FUNC_T` - `HAVE_SENDTO` - `HAVE_SETSOCKOPT` - `HAVE_SHUTDOWN` - `HAVE_SOCKET` - `HAVE_SYSTEM` - `HAVE_TTYNAME` - `HAVE_UMASK` - `HAVE_WAIT` Testing: * Command line option "-l/--findleaks" of regrtest is deprecated since Python 3.7 and removed in Python 3.11. It is superseded by `--fail-env-changed`. Co-authored-by: Brett Jia <dev.bjia56@gmail.com>
… in Python 3.11 Actual support for WASI still need to be implemented by adding CMake options equivalent to `--enable-wasm-dynamic-linking`, `--enable-wasm-pthreads` and `--with-emscripten-target`.
…uced in Python 3.11 HAVE_PTHREAD_STUBS is expected to be defined if the system is WASI. See python/cpython@e62a0dfab2b ("[3.11] gh-95174: Add pthread stubs for WASI (GH-95234) (#95503)", 2022-08-01)
See python/cpython@cbf54b1e7ea ("configure.in: Avoid autoconf warning: Assume C89 semantics that RETSIGTYPE is always void (issue #8510). pyconfig.h: Regenerate", 2010-05-08)
0f0af8d
to
f6c6040
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the CI testing is all green here. @jcfr You ready to integrate this work?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add checksums for Python 3.11.0 to 3.11.12
Set default python version to 3.11.12
Switch from
c99
toc11
Add convenience target
deepfreeze_modules
for regenerating download the deepfreeze sourcesCheck that TCL is at least 8.5.12
dbm extension:
GDBM_COMPAT
introducingNDBM_USE
variable set to eitherNDBM
orGDBM_COMPAT
. See python/cpython@0a9f69539be ("bpo-45747: Detect gdbm/dbm dependencies in configure (GH-29467)", 2021-11-10)Updated pyconfig.h.in
HAVE_BZLIB_H
HAVE_DB_H
HAVE_GDBM_DASH_NDBM_H
HAVE_GDBM_H
HAVE_GDBM_NDBM_H
HAVE_LZMA_H
HAVE_NDBM_H
HAVE_NETDB_H
HAVE_NETINET_IN_H
HAVE_RPC_RPC_H
HAVE_ZLIB_H
HAVE_LIBDB
HAVE_LIBGDBM_COMPAT
HAVE_LIBNDBM
HAVE_LIBSQLITE3
Updated pyconfig.h.in and configure checks:
Add options:
WITH_FREELISTS
set to 1 if Python 3.11 and 0 otherwiseAdd header checks:
HAVE_LINUX_LIMITS_H
HAVE_LINUX_SOUNDCARD_H
HAVE_NETCAN_CAN_H
HAVE_SETJMP_H
HAVE_SYS_SOUNDCARD_H
HAVE_SYSLOG_H
HAVE_UTMP_H
Add symbol checks:
HAVE_ACCEPT
HAVE_BIND
HAVE_CHMOD
HAVE_CLOCK_NANOSLEEP
HAVE_CONNECT
HAVE_DUP
HAVE_FORK1
HAVE_GETEGID
HAVE_GETEUID
HAVE_GETGID
HAVE_GETGRGID
HAVE_GETHOSTBYADDR
HAVE_GETHOSTNAME
HAVE_GETPPID
HAVE_GETPROTOBYNAME
HAVE_GETPWUID
HAVE_GETRUSAGE
HAVE_GETSERVBYNAME
HAVE_GETSERVBYPORT
HAVE_GETSOCKNAME
HAVE_GETUID
HAVE_INET_NTOA
HAVE_LISTEN
HAVE_LOGIN_TTY
HAVE_NANOSLEEP
HAVE_OPENDIR
HAVE_PIPE
HAVE_RECVFROM
HAVE_RL_COMPDISP_FUNC_T
HAVE_SENDTO
HAVE_SETSOCKOPT
HAVE_SHUTDOWN
HAVE_SOCKET
HAVE_SYSTEM
HAVE_TTYNAME
HAVE_UMASK
HAVE_WAIT
Testing:
regrtest
is deprecated since Python 3.7 and removed in Python 3.11. It is superseded by--fail-env-changed
.Update
pyconfig.h.in
adding the following WASI related defines that will require additional work:HAVE_PTHREAD_STUBS
,_WASI_EMULATED_GETPID
,_WASI_EMULATED_PROCESS_CLOCKS
,_WASI_EMULATED_SIGNAL
:Working toward addressing: