Skip to content

Commit 358b212

Browse files
Mamba413claudehappy-otter
committed
fix: resolve three CI build/runtime failures
- CMakeLists.txt aarch64: use -march=armv8-a instead of -march=native to avoid assembler errors in cp38 manylinux_aarch64 containers whose binutils don't recognise newer ARMv9.2+ extension flags - CMakeLists.txt: translate PYTHON_EXECUTABLE -> Python_EXECUTABLE and set PYBIND11_FINDPYTHON ON so CMake FindPython honours the hint for free-threaded Python (cp314t-win32 "libraries not found" was caused by the hint being silently ignored) - pyproject.toml: use pybind11<3 for Python<3.14, pybind11>=3.0.0 for Python>=3.14 (PEP 508 markers in [build-system].requires); pin global before-build to pybind11[global]<3; add cp314/cp314t override that installs pybind11[global]>=3.0.0 to fix macOS py3.14 segfault Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
1 parent 4c31e49 commit 358b212

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

python/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,20 @@ elseif(DARWIN)
1212
SET(CMAKE_CXX_FLAGS "-Wno-int-in-bool-context")
1313
SET(CMAKE_CXX_FLAGS_DEBUG "-Wall")
1414
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
15-
SET(CMAKE_CXX_FLAGS "-march=native -Wno-int-in-bool-context")
15+
SET(CMAKE_CXX_FLAGS "-march=armv8-a -Wno-int-in-bool-context")
1616
SET(CMAKE_CXX_FLAGS_DEBUG "-Wall")
1717
else()
1818
SET(CMAKE_CXX_FLAGS "-march=native -Wno-int-in-bool-context -mavx -mfma")
1919
SET(CMAKE_CXX_FLAGS_DEBUG "-Wall")
2020
endif()
2121

2222
# dependencies
23+
# Translate old-style hint (passed by setup.py -DPYTHON_EXECUTABLE=...)
24+
# to new-style used by CMake FindPython
25+
if(DEFINED PYTHON_EXECUTABLE AND NOT DEFINED Python_EXECUTABLE)
26+
set(Python_EXECUTABLE "${PYTHON_EXECUTABLE}")
27+
endif()
28+
set(PYBIND11_FINDPYTHON ON)
2329
find_package(pybind11)
2430
find_package(OpenMP)
2531

python/pyproject.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
requires = [
33
"setuptools>=42",
44
"wheel",
5-
"pybind11>=2.8.0,<3",
5+
"pybind11>=2.8.0,<3; python_version < '3.14'",
6+
"pybind11>=3.0.0; python_version >= '3.14'",
67
"cmake>=3.12,<4",
78
"packaging>=22",
89
"numpy>=1.20"
@@ -27,7 +28,7 @@ test-command = "pytest {package}/pytest -v"
2728
before-test = "pip install lifelines \"pandas<2.0.0\" scipy scikit-learn"
2829

2930
# install pybind11 for cmake
30-
before-build = "pip install pybind11[global]"
31+
before-build = "pip install 'pybind11[global]<3'"
3132

3233
[tool.cibuildwheel.linux]
3334
archs = ["x86_64", "i686", "aarch64"]
@@ -54,3 +55,7 @@ before-test = "pip install lifelines \"pandas<2.0.0\" scipy scikit-learn \"jobli
5455
[[tool.cibuildwheel.overrides]]
5556
select = "cp312-* cp312t-* cp313-* cp313t-* cp314-* cp314t-*"
5657
before-test = "pip install lifelines pandas scipy scikit-learn"
58+
59+
[[tool.cibuildwheel.overrides]]
60+
select = "cp314-* cp314t-*"
61+
before-build = "pip install 'pybind11[global]>=3.0.0'"

0 commit comments

Comments
 (0)