-
Notifications
You must be signed in to change notification settings - Fork 51
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
PYBIND11_FINDPYTHON=ON
#1684
PYBIND11_FINDPYTHON=ON
#1684
Conversation
Should we add this logic to our superbuilds in CMake? Set |
Possibly, yes! We should set the executable that was found here: So a simple set(PYTHON_EXECUTABLE ${Python_EXECUTABLE}) might make it already more robust. |
setup.py
: Hint pybind11 FindPythonLibsNew
PYBIND11_FINDPYTHON=ON
4be17cc
to
e8c6f5c
Compare
Ok, so if we set Then pybind11 will call Well, not obvious from the docs, but ok. |
e8c6f5c
to
9bc591f
Compare
MSVC: calling # python3.exe is c:\hostedtoolcache\windows\python\3.9.13\x64\python3.exe
$ python3.exe -m pip wheel -v .
...
-- Found Python: C:/hostedtoolcache/windows/Python/3.12.7/x64/python3.exe (found suitable version "3.12.7", minimum required is "3.7.0") found components: Interpreter Development.Module
... Which hints do we want to set in MSVC: NumPy requires newer Python:
|
de3b2a5
to
7c0972a
Compare
Found a way to hint location and, if multiple versions are installed, version: |
7c0972a
to
4ce16ce
Compare
Reuse our `find_package(Python ...)` call and use new CMake logic in pybind11. https://pybind11.readthedocs.io/en/stable/compiling.html#modules-with-cmake https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-version-selection Signed-off-by: Axel Huebl <[email protected]>
4ce16ce
to
22c34fc
Compare
Ok, that should do the trick :) |
Equivalent PRs to:
all pass :) |
Reuse our
find_package(Python ...)
call and use new CMake logic in pybind11.https://pybind11.readthedocs.io/en/stable/compiling.html#modules-with-cmake
https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-version-selection
Fix #1677 (comment)