From 7cb0272ed4e89d1976aa53c842267fc461480bbb Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Fri, 19 Apr 2024 19:33:56 +0400 Subject: [PATCH] Updated pybind11 to 2.12.0 --- .github/workflows/linux_riscv.yml | 2 +- cmake/developer_package/OpenVINODeveloperScriptsConfig.cmake | 2 ++ src/bindings/python/CMakeLists.txt | 3 +++ src/bindings/python/thirdparty/pybind11 | 2 +- .../mock_mo_frontend/mock_mo_python_api/CMakeLists.txt | 3 +++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux_riscv.yml b/.github/workflows/linux_riscv.yml index d764c1f96c1645..dc4a9e661c3632 100644 --- a/.github/workflows/linux_riscv.yml +++ b/.github/workflows/linux_riscv.yml @@ -110,6 +110,7 @@ jobs: git submodule update --init -- ${OPENVINO_REPO}/thirdparty/telemetry git submodule update --init -- ${OPENVINO_REPO}/src/plugins/intel_cpu git submodule update --init -- ${OPENVINO_REPO}/thirdparty/open_model_zoo + git submodule update --init -- ${OPENVINO_REPO}/src/bindings/python/thirdparty/pybind11 popd # @@ -193,7 +194,6 @@ jobs: -DENABLE_PYTHON=ON \ -DENABLE_WHEEL=ON \ -DPYTHON_MODULE_EXTENSION=$(riscv64-linux-gnu-python3-config --extension-suffix) \ - -DPYBIND11_PYTHON_EXECUTABLE_LAST=${OPENVINO_BUILD_DIR}/env/bin/python3.10 \ -DENABLE_TESTS=ON \ -DENABLE_PYTHON_PACKAGING=ON \ -DENABLE_SYSTEM_PROTOBUF=ON \ diff --git a/cmake/developer_package/OpenVINODeveloperScriptsConfig.cmake b/cmake/developer_package/OpenVINODeveloperScriptsConfig.cmake index 6197d664cff7b6..acbb3574dbf14f 100644 --- a/cmake/developer_package/OpenVINODeveloperScriptsConfig.cmake +++ b/cmake/developer_package/OpenVINODeveloperScriptsConfig.cmake @@ -222,6 +222,8 @@ set(CMAKE_POLICY_DEFAULT_CMP0111 NEW) set(CMAKE_POLICY_DEFAULT_CMP0127 NEW) # CMake 3.24+ :prefers to set the timestamps of all extracted contents to the time of the extraction set(CMAKE_POLICY_DEFAULT_CMP0135 NEW) +# CMake 3.27+ :The FindPythonInterp and FindPythonLibs modules are removed. +set(CMAKE_POLICY_DEFAULT_CMP0148 NEW) set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "Don't warn about obsolete cmake versions in 3rdparty") set(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION ON CACHE BOOL "Warn about absolute paths in destination") diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt index 83e03d4390f6f0..57a26e5c08c844 100644 --- a/src/bindings/python/CMakeLists.txt +++ b/src/bindings/python/CMakeLists.txt @@ -201,6 +201,9 @@ if(Python3_VERSION_MINOR GREATER_EQUAL 11) else() set(pybind11_min_version 2.8.0) endif() +if(CMAKE_CROSSCOMPILING) + set(pybind11_min_version 2.12.0) +endif() find_package(Python3 REQUIRED COMPONENTS Interpreter ${python3_development_component}) find_package(pybind11 ${pybind11_min_version} QUIET) diff --git a/src/bindings/python/thirdparty/pybind11 b/src/bindings/python/thirdparty/pybind11 index 2965fa8de3cf9e..3e9dfa28669416 160000 --- a/src/bindings/python/thirdparty/pybind11 +++ b/src/bindings/python/thirdparty/pybind11 @@ -1 +1 @@ -Subproject commit 2965fa8de3cf9e82c789f906a525a76197b186c1 +Subproject commit 3e9dfa2866941655c56877882565e7577de6fc7b diff --git a/tools/mo/unit_tests/mock_mo_frontend/mock_mo_python_api/CMakeLists.txt b/tools/mo/unit_tests/mock_mo_frontend/mock_mo_python_api/CMakeLists.txt index 75b793f045e7ac..463c6c8ab19e12 100644 --- a/tools/mo/unit_tests/mock_mo_frontend/mock_mo_python_api/CMakeLists.txt +++ b/tools/mo/unit_tests/mock_mo_frontend/mock_mo_python_api/CMakeLists.txt @@ -30,6 +30,9 @@ if(Python3_VERSION_MINOR GREATER_EQUAL 11) else() set(pybind11_min_version 2.8.0) endif() +if(CMAKE_CROSSCOMPILING) + set(pybind11_min_version 2.12.0) +endif() find_package(pybind11 ${pybind11_min_version} QUIET)