Skip to content

Commit

Permalink
Find Python Interpreter component on macOS under cibuildwheel
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed May 18, 2024
1 parent 66a60ca commit aeb11a1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/pybind11-project/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (DEFINED PY_BUILD_CMAKE_PACKAGE_VERSION)
endif()

# Find the Python interpreter and the development files
if (CMAKE_CROSSCOMPILING)
if (CMAKE_CROSSCOMPILING AND NOT (APPLE AND ENV{CIBUILDWHEEL} STREQUAL "1"))
find_package(Python3 REQUIRED COMPONENTS Development.Module)
else()
find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mark_as_advanced(USE_GLOBAL_PYBIND11)
function(find_pybind11_python_first)

# Find Python
if (CMAKE_CROSSCOMPILING)
if (CMAKE_CROSSCOMPILING AND NOT (APPLE AND ENV{CIBUILDWHEEL} STREQUAL "1"))
find_package(Python3 REQUIRED COMPONENTS Development.Module)
else()
find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
Expand Down
2 changes: 1 addition & 1 deletion test-packages/namespace-project-a/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (DEFINED PY_BUILD_CMAKE_PACKAGE_VERSION)
endif()

# Find the Python interpreter and the development files
if (CMAKE_CROSSCOMPILING)
if (CMAKE_CROSSCOMPILING AND NOT (APPLE AND ENV{CIBUILDWHEEL} STREQUAL "1"))
find_package(Python3 REQUIRED COMPONENTS Development.Module)
else()
find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ mark_as_advanced(USE_GLOBAL_PYBIND11)
function(find_pybind11_python_first)

# Find Python
if (CMAKE_CROSSCOMPILING)
if (CMAKE_CROSSCOMPILING AND NOT (APPLE AND ENV{CIBUILDWHEEL} STREQUAL "1"))
find_package(Python3 REQUIRED COMPONENTS Development.Module)
else()
find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
Expand Down

0 comments on commit aeb11a1

Please sign in to comment.