diff --git a/cmake/dependencies/pybind11.cmake b/cmake/dependencies/pybind11.cmake index cd5ee7463..3a6c01e99 100644 --- a/cmake/dependencies/pybind11.cmake +++ b/cmake/dependencies/pybind11.cmake @@ -10,6 +10,11 @@ function(find_pybind11) message(STATUS "pybind11 repository: ${ImpactX_pybind11_repo} (${ImpactX_pybind11_branch})") include(FetchContent) endif() + + # rely on our find_package(Python ...) call + # https://pybind11.readthedocs.io/en/stable/compiling.html#modules-with-cmake + set(PYBIND11_FINDPYTHON ON) + if(ImpactX_pybind11_internal OR ImpactX_pybind11_src) set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) diff --git a/setup.py b/setup.py index 480089744..cf59a32dc 100644 --- a/setup.py +++ b/setup.py @@ -78,7 +78,6 @@ def build_extension(self, ext): "-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=" + os.path.join(extdir, "impactx"), "-DCMAKE_VERBOSE_MAKEFILE=ON", "-DCMAKE_PYTHON_OUTPUT_DIRECTORY=" + extdir, - "-DPython_EXECUTABLE=" + sys.executable, ## variants "-DImpactX_COMPUTE=" + ImpactX_COMPUTE, "-DImpactX_FFT:BOOL=" + ImpactX_FFT,