Skip to content

Commit 6b70c28

Browse files
committed
Fix pybind11 Python detection for macOS-14 ARM64 builds
- Add -DPython_EXECUTABLE and -DPYBIND11_FINDPYTHON=ON to cmake_args to ensure pybind11 uses the correct Python interpreter and ABI tag - This fixes the issue where macOS-14 builds were creating modules with cpython-310 tags instead of the correct cpython-312 tags - Keep -DPYTHON_EXECUTABLE for backward compatibility with older pybind11
1 parent 9d39b88 commit 6b70c28

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ def build_extension(self, ext):
5959
"-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=" + extdir,
6060
"-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=" + extdir,
6161
"-DPYTHON_EXECUTABLE=" + sys.executable,
62+
"-DPython_EXECUTABLE=" + sys.executable,
63+
"-DPYBIND11_FINDPYTHON=ON",
6264
"-DBUILD_SHARED_LIBS=OFF",
6365
]
6466

0 commit comments

Comments
 (0)