diff --git a/ci/arm/arm_build_process.sh b/ci/arm/arm_build_process.sh index c1a1abb5df..2d872a5035 100755 --- a/ci/arm/arm_build_process.sh +++ b/ci/arm/arm_build_process.sh @@ -300,6 +300,7 @@ build_scopy() { CURRENT_BUILD_CMAKE_OPTS="\ -DENABLE_PLUGIN_TEST=ON \ -DENABLE_TESTING=ON \ + -DPYTHON_EXECUTABLE=$SYSROOT/bin/python3 \ " build_with_cmake popd diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 01cf4742a3..33015e69e9 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -61,15 +61,14 @@ if(${WITH_PYTHON}) endif() if(CMAKE_SYSTEM_PROCESSOR MATCHES arm) - find_package(Python3 3.9 EXACT REQUIRED COMPONENTS Interpreter) - message(STATUS "Host Python Interpreter " ${Python3_EXECUTABLE}) - set(Python3_EXECUTABLE ${CMAKE_SYSROOT}/bin/python3.9) - message(STATUS "Target Python Interpreter " ${Python3_EXECUTABLE}) + find_package(Python3 REQUIRED COMPONENTS Development) else() find_package(Python3 REQUIRED COMPONENTS Interpreter Development) - message(STATUS "Python Interpreter " ${Python3_EXECUTABLE}) - message(STATUS "Python Libraries " ${Python3_LIBRARIES}) endif() + + message(STATUS "Python Interpreter " ${Python3_EXECUTABLE}) + message(STATUS "Python Libraries " ${Python3_LIBRARIES}) + set(PYTHON_VERSION python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR} CACHE STRING "PYTHON_USED") set(PYTHON_VERSION ${PYTHON_VERSION} PARENT_SCOPE) if(NOT Python3_FOUND)