Skip to content

Commit f0f6eb6

Browse files
author
Kasper Peeters
committed
Trying to direct pybind11 to use the python found by find_package.
1 parent cf30786 commit f0f6eb6

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

CMakeLists.txt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -303,15 +303,9 @@ print_header("Configuring Python")
303303
include(GNUInstallDirs)
304304

305305
set(Python_POSTFIX "3")
306-
#if(WIN32)
307-
# # No amount of fiddling seems to convince cmake to use the MSYS2 python
308-
# # instead of whatever other nonsense is installed on github runners.
309-
# # So we force it to an exact version which is not available except in
310-
# # the MSYS2 environment. Sue me.
311-
# find_package(Python 3.11.10 EXACT REQUIRED COMPONENTS Interpreter Development)
312-
#else()
313-
find_package(Python REQUIRED COMPONENTS Interpreter Development)
314-
#endif()
306+
find_package(Python REQUIRED COMPONENTS Interpreter Development)
307+
set(PYTHON_EXECUTABLE ${Python_EXECUTABLE} CACHE INTERNAL "")
308+
set(PYBIND11_PYTHON_VERSION ${Python_VERSION} CACHE INTERNAL "")
315309
find_package(pybind11 CONFIG)
316310
if (NOT pybind11_FOUND)
317311
message(STATUS "Using included pybind11.")

0 commit comments

Comments
 (0)