Skip to content

Conversation

henryiii
Copy link
Collaborator

No description provided.

@henryiii
Copy link
Collaborator Author

@mhsmith Do you know why pybind11 isn't found? It should be in the build temporary venv, and scikit-build-core is adding the site-packages to the CMAKE_MODULE_PATH.

@mhsmith
Copy link
Contributor

mhsmith commented Aug 10, 2025

This is because of the set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) that cibuildwheel adds to the CMake toolchain. I copied that from the CMake documentation, but it's not correct in this case because it prevents build systems from loading non-platform-specific packages from outside of the root path.

I've fixed this in pypa/cibuildwheel#2547.

@mhsmith
Copy link
Contributor

mhsmith commented Aug 10, 2025

Note to my future self: the relevant variable is CMAKE_PREFIX_PATH, which scikit-build-core sets to the venv's site-packages directory. This works because one of the many paths that find_package searches is <prefix>/<name>*/(lib/<arch>|lib*|share)/cmake/<name>*/, and the pybind installation has its cmake files in pybind11/share/cmake/pybind11.

henryiii and others added 3 commits August 12, 2025 16:33
@henryiii
Copy link
Collaborator Author

henryiii commented Aug 12, 2025

@mhsmith Seem to be getting a timeout error? Is that expected? Same issue in scikit-hep/boost-histogram#1045.

Edit: ahh, I see "GitHub Actions can't currently run the Android emulator on macOS" in pybind11. I'll try to copy what's in there.

@henryiii henryiii merged commit 10f7cb4 into master Aug 13, 2025
24 checks passed
@henryiii henryiii deleted the henryiii-patch-3 branch August 13, 2025 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants