[CMake][Python] Bump minimum CMake version to 3.26#23607
[CMake][Python] Bump minimum CMake version to 3.26#23607kuhar merged 2 commits intoiree-org:mainfrom
Conversation
CMake 3.26 added FindPython's Development.SABIModule component, which is required for building Python Stable ABI (abi3) extension modules. With this minimum version, we can unconditionally request Development.SABIModule upfront in the Python find_package calls, before deciding whether to enable abi3. This is necessary because the SABI module must be found early — the same place we find Development.Module — and cannot be deferred to after the abi3 option is resolved. CMake 3.26 availability: Source │ Version ──────────────────────────┼───────── pip install cmake │ 4.2.3 Homebrew │ 4.2.3 Chocolatey (Windows CI) │ 4.2.3 Ubuntu 24.04 (apt) │ 3.28.3 Ubuntu 22.04 (apt) │ 3.22.1 ✗ (use pip or Kitware APT repo) Debian 12 bookworm (apt) │ 3.25.1 ✗ (3.31.6 in backports) Co-Authored-By: Claude Opus 4.6 <[email protected]>
amd-eochoalo
left a comment
There was a problem hiding this comment.
Thanks!
CMake 3.31.2 fixed a bug related to SABIModule
FindPython: Ensure SABIModule is found in all cases
I looked a bit further and I think it may be this one which relates to cross compiling on Windows. I don't believe we need this patch, just making a note that this issue exist and was solved in version 3.31.2 .
I think we should be fine because we always request the interpreter component: Line 748 in a21fa38 Thanks for a thorough review BTW, I a wasn't aware of these potential teething issues. |
|
We need to update cmake on |
Done, as simple as: sudo apt remove cmake -yqq
pip install --user cmake |
|
Extra data points:
|
|
Nobody borough up concerns and the CI passed, merging |
I want to make sure we exercise stable ABI builds in our default development flows, not only when building wheels. Auto-detect `IREE_ENABLE_PYTHON_STABLE_ABI` after `find_package(Python)` instead of requiring it to be explicitly set. The cache variable can still be overridden with `-DIREE_ENABLE_PYTHON_STABLE_ABI=ON/OFF`. Since CMake 3.26 is now the minimum, `Development.SABIModule` is always requested unconditionally in `find_package`: iree-org#23607. Co-Authored-By: Claude Opus 4.6 <[email protected]>
I want to make sure we exercise stable ABI builds in our default development flows, not only when building wheels. Auto-detect `IREE_ENABLE_PYTHON_STABLE_ABI` after `find_package(Python)` instead of requiring it to be explicitly set. The cache variable can still be overridden with `-DIREE_ENABLE_PYTHON_STABLE_ABI=ON/OFF`. Since CMake 3.26 is now the minimum, `Development.SABIModule` is always requested unconditionally in `find_package`: iree-org#23607. Co-Authored-By: Claude Opus 4.6 <[email protected]>
I want to make sure we exercise stable ABI builds in our default development flows, not only when building wheels. Auto-detect `IREE_ENABLE_PYTHON_STABLE_ABI` after `find_package(Python)` instead of requiring it to be explicitly set. The cache variable can still be overridden with `-DIREE_ENABLE_PYTHON_STABLE_ABI=ON/OFF`. Since CMake 3.26 is now the minimum, `Development.SABIModule` is always requested unconditionally in `find_package`: iree-org#23607. Co-Authored-By: Claude Opus 4.6 <[email protected]>
I want to make sure we exercise stable ABI builds in our default development flows, not only when building wheels. Auto-detect `IREE_ENABLE_PYTHON_STABLE_ABI` after `find_package(Python)` instead of requiring it to be explicitly set. The cache variable can still be overridden with `-DIREE_ENABLE_PYTHON_STABLE_ABI=ON/OFF`. Since CMake 3.26 is now the minimum, `Development.SABIModule` is always requested unconditionally in `find_package`: iree-org#23607. Co-Authored-By: Claude Opus 4.6 <[email protected]>
I want to make sure we exercise stable ABI builds in our default development flows, not only when building wheels. Auto-detect `IREE_ENABLE_PYTHON_STABLE_ABI` after `find_package(Python)` instead of requiring it to be explicitly set. The cache variable can still be overridden with `-DIREE_ENABLE_PYTHON_STABLE_ABI=ON/OFF`. Since CMake 3.26 is now the minimum, `Development.SABIModule` is always requested unconditionally in `find_package`: iree-org#23607. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…GIL (#23629) I want to make sure we exercise stable ABI builds in our default development flows, not only when building wheels. Auto-detect `IREE_ENABLE_PYTHON_STABLE_ABI` after `find_package(Python)` instead of requiring it to be explicitly set. The cache variable can still be overridden with `-DIREE_ENABLE_PYTHON_STABLE_ABI=ON/OFF`. Since CMake 3.26 is now the minimum, `Development.SABIModule` is always requested unconditionally in `find_package`: #23607. ci-extra: all Co-authored-by: Claude Opus 4.6 <[email protected]>
CMake 3.26 added FindPython's
Development.SABIModulecomponent, which is required for building Stable ABI (abi3). With this minimum version, we can unconditionally requestSABIModuleupfront in the Pythonfind_packagecalls, before deciding whether to enable abi3. This is appealing because the SABI module must be found early and cannot be deferred to after the abi3 option is resolved; otherwise we need the user to decide through cmake flags.CMake 3.26 availability:
pip install cmake: 4.2.3
Homebrew: 4.2.3
Chocolatey (Windows CI): 4.2.3
Ubuntu 24.04 (apt): 3.28.3
Ubuntu 22.04 (apt): 3.22.1 (use pip or Kitware APT repo)
Debian 12 bookworm (apt): 3.25.1 (3.31.6 in backports)
ci-extra: all