Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[Py OV] Switch pybind11 to v3.0.1 (#32899)

Alicja Miloszewska5befa9808989
diff --git a/conan.lock b/conan.lock
index f78ad37f8f6..b92111de8d1 100644
--- a/conan.lock
+++ b/conan.lock
@@ -4,7 +4,7 @@
"xbyak/6.73#250bc3bc73379f90f255876c1c00a4cd%1691853024.351",
"snappy/1.1.10#916523630083f6d855cb2977de8eefb6%1689780661.062",
"rapidjson/cci.20220822#8ca51918340f3a21127822258e95ec0f%1663194355.698",
- "pybind11/2.12.0#1bf487c19d580200ba9b74afcc4174b4%1711607911.876",
+ "pybind11/3.0.1#81ed7e3cc5c945080013ca4c5c3abbbb%1756292333.72",
"pugixml/1.13#f615c1fcec55122b2e177d17061276e7%1691917296.869",
"protobuf/3.21.12#d9f5f4e3b86552552dda4c0a2e928eeb%1685218275.69",
"opencl-icd-loader/2023.04.17#5f73dd9f0c023d416a7f162e320b9c77%1692732261.088",
diff --git a/conanfile.txt b/conanfile.txt
index 46d6d8d65d3..85ab34a069e 100644
--- a/conanfile.txt
+++ b/conanfile.txt
@@ -8,7 +8,7 @@ rapidjson/[>=1.1.0]
xbyak/[>=6.62]
snappy/[>=1.1.7]
onnx/1.17.0
-pybind11/[>=2.12.0]
+pybind11/[>=3.0.1]
flatbuffers/[>=22.9.24]
[tool_requires]
diff --git a/src/bindings/python/CMakeLists.txt b/src/bindings/python/CMakeLists.txt
index 13439135f50..7f54a3945e8 100644
--- a/src/bindings/python/CMakeLists.txt
+++ b/src/bindings/python/CMakeLists.txt
@@ -191,11 +191,8 @@ endif()
# Build the code
#
-if(CMAKE_CROSSCOMPILING)
- set(pybind11_min_version 2.12.0)
-else()
- set(pybind11_min_version 2.12.0)
-endif()
+
+set(pybind11_min_version 3.0.1)
# search for FindPython3.cmake instead of legacy modules
set(PYBIND11_FINDPYTHON ON)
diff --git a/src/bindings/python/thirdparty/pybind11 b/src/bindings/python/thirdparty/pybind11
index ed5057ded69..f5fbe867d2d 160000
--- a/src/bindings/python/thirdparty/pybind11
+++ b/src/bindings/python/thirdparty/pybind11
@@ -1 +1 @@
-Subproject commit ed5057ded698e305210269dafa57574ecf964483
+Subproject commit f5fbe867d2d26e4a0a9177a51f6e568868ad3dc8