Skip to content

Add support for building Python 3.10.x #383

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 1 commit into from
May 8, 2025

Conversation

jcfr
Copy link
Contributor

@jcfr jcfr commented May 7, 2025

  • Add checksums for Python 3.10.0 to 3.10.17

  • Set default python version to 3.10.17

Added modules:

  • _testclinic introduced in Python 3.10.10

  • _xxsubinterpreters introduced in Python 3.7

Removed modules:

  • parser

Removed options:

  • Support for setting BUILD_WININST and BUILD_WININST_ALWAYS was removed
    in Python 3.10. See python/cpython@0e2a0f72cc9 ("bpo-42802: Remove distutils
    bdist_wininst command (GH-24043)", 2021-01-09)

Definitions:

  • Associate PY3_DLLNAME with Python/pathconfig.c.

Readline support:

  • Add support building against libedit (editline) library on non-apple system
    by setting the WITH_EDITLINE definition if USE_LIBEDIT CMake option is ON.
    See python/cpython@e1f77695132 ("bpo-13501: allow choosing between readline and libedit (GH-24189)", 2021-02-09)

  • Change USE_LIBEDIT CMake option to be independent of USE_SYSTEM_READLINE.

  • Remove setting of USE_LIBEDIT definition that was specific
    to cmake/patches/01-readline-libedit.patch. Remove the patch as it was not
    applied automatically and is now superseded by the use of WITH_EDITLINE available starting with Python 3.10.

Updated pyconfig.h.in and configure checks:

  • Add WITH_VALGRIND top-level CMake option. If enabled and if header valgrind/valgrind.h
    is found, the CMake variable DYNAMIC_ANNOTATIONS_ENABLED is set and the corresponding
    pre-processor is defined in pyconfig.h.

  • Skip adding EXPERIMENTAL_ISOLATED_SUBINTERPRETERS as it was added in
    Python 3.10 and later removed in Python 3.11:

  • Add header checks:

    • HAVE_LINUX_AUXVEC_H
    • HAVE_SYS_AUXV_H
    • HAVE_SYS_EVENTFD_H
  • Add size type checks:

    • ALIGNOF_LONG
    • ALIGNOF_SIZE_T
  • Add symbol checks:

    • HAVE_SPLICE
    • HAVE_CLOSE_RANGE
    • HAVE_EVENTFD
    • HAVE_VFORK

Working toward addressing:

@jcfr jcfr linked an issue May 7, 2025 that may be closed by this pull request
@jcfr jcfr force-pushed the add-python-3.10-support branch 10 times, most recently from b9ad6a1 to 3ed18fc Compare May 8, 2025 13:53
* Add checksums for Python 3.10.0 to 3.10.17

* Set default python version to 3.10.17

Added modules:

* `_testclinic` introduced in Python 3.10.10

* `_xxsubinterpreters`  introduced in Python 3.7

Removed modules:

* `parser`

Removed options:

* Support for setting `BUILD_WININST` and `BUILD_WININST_ALWAYS` was removed
  in Python 3.10. See python/cpython@0e2a0f72cc9 ("bpo-42802: Remove distutils
  bdist_wininst command (GH-24043)", 2021-01-09)

Definitions:

* Associate `PY3_DLLNAME` with `Python/pathconfig.c`.
  - Added to Python 3.10 through python/cpython@8f42748ded5 ("bpo-29778: test_embed tests the path configuration (GH-21306)", 2020-07-08)
  - Removed in Python 3.11 through python/cpython@99fcf150521 ("bpo-45582: Port getpath[p].c to Python (GH-29041)", 2021-12-03)

Readline support:

* Add support building against libedit (editline) library on non-apple system
  by setting the `WITH_EDITLINE` definition if `USE_LIBEDIT` CMake option is ON.
  See python/cpython@e1f77695132 ("bpo-13501: allow choosing between readline and libedit (GH-24189)", 2021-02-09)

* Change `USE_LIBEDIT` CMake option to be independent of `USE_SYSTEM_READLINE`.

* Remove setting of `USE_LIBEDIT` definition that was specific
  to `cmake/patches/01-readline-libedit.patch`. Remove the patch as it was not
  applied automatically and is now superseded by the use of `WITH_EDITLINE` available starting with Python 3.10.

Updated pyconfig.h.in and configure checks:

* Add `WITH_VALGRIND` top-level CMake option. If enabled and if header `valgrind/valgrind.h`
  is found, the CMake variable `DYNAMIC_ANNOTATIONS_ENABLED` is set and the corresponding
  pre-processor is defined in `pyconfig.h`.

* Skip adding `EXPERIMENTAL_ISOLATED_SUBINTERPRETERS` as it was added in
  Python 3.10 and later removed in Python 3.11:
  - 3.11: python/cpython@36374251aa3 ("[3.11] bpo-40514: Drop EXPERIMENTAL_ISOLATED_SUBINTERPRETERS (gh-93185) (GH-93306)", 2022-05-27)
  - 3.10: python/cpython@c5fa364f4ea ("bpo-40514: Add --with-experimental-isolated-subinterpreters (GH-19926)", 2020-05-05)

* Add header checks:
  - `HAVE_LINUX_AUXVEC_H`
  - `HAVE_SYS_AUXV_H`
  - `HAVE_SYS_EVENTFD_H`

* Add size type checks:
  - `ALIGNOF_LONG`
  - `ALIGNOF_SIZE_T`

* Add symbol checks:
  - `HAVE_SPLICE`
  - `HAVE_CLOSE_RANGE`
  - `HAVE_EVENTFD`
  - `HAVE_VFORK`

Co-authored-by: Brett Jia <dev.bjia56@gmail.com>
@jcfr jcfr force-pushed the add-python-3.10-support branch from 3ed18fc to ec44395 Compare May 8, 2025 14:30
@jcfr jcfr merged commit 548f13c into python-cmake-buildsystem:master May 8, 2025
20 checks passed
@jcfr jcfr deleted the add-python-3.10-support branch May 8, 2025 14:41
@jcfr jcfr linked an issue Jun 2, 2025 that may be closed by this pull request
@jcfr jcfr mentioned this pull request Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Python 3.10 python 3.10 request for a bigger performance enhance in this version
1 participant