Skip to content

Commit

Permalink
Force python to be from msys.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasper Peeters committed Sep 27, 2024
1 parent cfdaca5 commit 400cee4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,13 @@ print_header("Configuring Python")
include(GNUInstallDirs)

set(Python_POSTFIX "3")
if(WIN32)
# Set the PYTHON_EXECUTABLE variable explicitly to ensure
# that we use the msys2 python, not anything else that may
# be floating around too (like on github runners...).
set(Python_EXECUTABLE "/usr/bin/python3")
set(PYTHON_EXECUTABLE "/usr/bin/python3")
endif()
find_package(Python COMPONENTS Interpreter Development)
find_package(pybind11 CONFIG)
if (NOT pybind11_FOUND)
Expand Down

0 comments on commit 400cee4

Please sign in to comment.