summaryrefslogtreecommitdiff
path: root/subprojects
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>2023-05-30 15:01:33 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-05-31 19:48:02 +0300
commitad4719c10c6a401a30784c2bfc83345b1af60b31 (patch)
tree948a9db737211c7137c84907105c842bf003878f /subprojects
parent51dc505d63fb2fd1255bcc71b5927488aadaf78c (diff)
py: Move to mainline pybind11 version
We are using pybind11 'smart_holder' branch to solve the Camera destructor issue (see the comment in this patch, or the commit that originally added Python bindings support). As it would be very nice to use the mainline pybind11 (which is packaged in distributions), this patch adds a workaround allowing us to move to the mainline pybind11 version. The workaround is simply creating a custom holder class (PyCameraSmartPtr), used only for the Camera, which wraps around the shared_ptr. This makes the compiler happy. Moving to mainline pybind11 is achieved with: - Change the pybind11 wrap to point to the mainline pybdind11 version - Tell pybind11 to always use shared_ptr<> as the holder for PyCameraManager, as we use the singleton pattern for the PyCameraManager, and using shared_ptr<> to manage it is a requirement - Tell pybind11 to always use PyCameraSmartPtr<> as the holder for Camera - Change the meson.build file to use a system-installed pybind11 Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'subprojects')
-rw-r--r--subprojects/.gitignore2
-rw-r--r--subprojects/pybind11.wrap11
2 files changed, 1 insertions, 12 deletions
diff --git a/subprojects/.gitignore b/subprojects/.gitignore
index 0a8fd3a6..ebe59479 100644
--- a/subprojects/.gitignore
+++ b/subprojects/.gitignore
@@ -4,4 +4,4 @@
/libyaml
/libyuv
/packagecache
-/pybind11
+/pybind11-*
diff --git a/subprojects/pybind11.wrap b/subprojects/pybind11.wrap
deleted file mode 100644
index dd02687b..00000000
--- a/subprojects/pybind11.wrap
+++ /dev/null
@@ -1,11 +0,0 @@
-# SPDX-License-Identifier: CC0-1.0
-
-[wrap-git]
-url = https://github.com/pybind/pybind11.git
-# This is the head of 'smart_holder' branch
-revision = aebdf00cd060b871c5a1e0c2cf4a333503dd0431
-depth = 1
-patch_directory = pybind11
-
-[provide]
-pybind11 = pybind11_dep