From patchwork Fri May 6 14:54:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 15811 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 5F642C0F2A for ; Fri, 6 May 2022 14:55:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 680516564B; Fri, 6 May 2022 16:55:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1651848912; bh=whA6FkmzqVrzEVllGixHovMMmQUB9Q0nqBiM3zdktcU=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=QkrkQLN3GT4BBPdVIQMfD2D3vr7mCAP0AxMaoVMXFoBIgHsNwyJqd/E47Hh9BZBMR uJIdqDj7HtL2lFg6nT15mEP+M6ryu3zKHFMyBmoqmPMAi+Goko1nptmcBIV+DkUC1o 9E5RYKYoRQnWyExKqn3X8O5zLL15/Bnv1KkgeDhsr/nDBrOHJ1V82w1a5uPSt3JBEQ eylAz8bI5y1SKjFRCqKs5Qca0/E507aNrfB9+LzyO34/qzBIdV+uNhsEXH2+50bcKq 0bohVF5lLGp3Zy6n/Highke1+9w8ByrvsCEpvVh+yp5DLR8IhXExC3+OCEUWzAkIWX HkbDj50K94/rw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2FD50604A3 for ; Fri, 6 May 2022 16:55:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="VNof4ZwF"; dkim-atps=neutral Received: from deskari.lan (91-156-85-209.elisa-laajakaista.fi [91.156.85.209]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 14D2F492; Fri, 6 May 2022 16:55:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1651848909; bh=whA6FkmzqVrzEVllGixHovMMmQUB9Q0nqBiM3zdktcU=; h=From:To:Cc:Subject:Date:From; b=VNof4ZwFR15q7oQG3QRlY1T6dYlB/1nylTKlzeNhUfY794SCmdCCy+95umXK9jaXE A/zvZBB0lEtZkwyQC6HboI900FYo5cbBWFdP9EP1wQdSTnWjlijO/rYs3f0XoYS6VY Y7Hf4PwaSeyQQwgxa44YkFy2z4vYjR/NjALZCwd0= To: libcamera-devel@lists.libcamera.org, David Plowman , Kieran Bingham , Laurent Pinchart , Jacopo Mondi Date: Fri, 6 May 2022 17:54:07 +0300 Message-Id: <20220506145414.99039-1-tomi.valkeinen@ideasonboard.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v8 0/7] Python bindings X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Tomi Valkeinen via libcamera-devel From: Tomi Valkeinen Reply-To: Tomi Valkeinen Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi, v8 of the Python Bindings series. Changes to v7: - Squashed the commits. It was very difficult to manage them separately due to the amount of changes done, and David was fine with squashing his code. - " to ' in py files - Dropped "using namespace std" - Member & function naming changes: use C++ style for things that are not visible from Python, and Python style for the visible things. - Changed some enums to inside-a-class-enums (e.g. RequestStatus.* to Request.Status.*) - A bunch of other small cleanups or comment additions Big thanks to Laurent and Kieran for reviewing the v7! Tomi Tomi Valkeinen (7): meson: require meson 0.56+ meson: use new project_*_root() functions meson: add 'check: true' for run_command() calls Add Python bindings py: generate control enums from yaml py: add unittests.py py: Add cam.py Documentation/meson.build | 4 +- README.rst | 4 +- include/libcamera/ipa/meson.build | 8 +- meson.build | 17 +- meson_options.txt | 5 + src/libcamera/meson.build | 4 +- src/meson.build | 1 + src/py/cam/cam.py | 484 +++++++++++++ src/py/cam/cam_kms.py | 183 +++++ src/py/cam/cam_null.py | 47 ++ src/py/cam/cam_qt.py | 354 ++++++++++ src/py/cam/cam_qtgl.py | 385 +++++++++++ src/py/cam/gl_helpers.py | 74 ++ src/py/libcamera/__init__.py | 84 +++ src/py/libcamera/gen-py-control-enums.py | 95 +++ src/py/libcamera/meson.build | 63 ++ src/py/libcamera/pyenums.cpp | 34 + src/py/libcamera/pyenums_generated.cpp.in | 21 + src/py/libcamera/pymain.cpp | 642 ++++++++++++++++++ src/py/meson.build | 1 + subprojects/.gitignore | 3 +- subprojects/packagefiles/pybind11/meson.build | 7 + subprojects/pybind11.wrap | 9 + test/meson.build | 1 + test/py/meson.build | 17 + test/py/unittests.py | 352 ++++++++++ .../include/libcamera/ipa/meson.build | 4 +- 27 files changed, 2880 insertions(+), 23 deletions(-) create mode 100755 src/py/cam/cam.py create mode 100644 src/py/cam/cam_kms.py create mode 100644 src/py/cam/cam_null.py create mode 100644 src/py/cam/cam_qt.py create mode 100644 src/py/cam/cam_qtgl.py create mode 100644 src/py/cam/gl_helpers.py create mode 100644 src/py/libcamera/__init__.py create mode 100755 src/py/libcamera/gen-py-control-enums.py create mode 100644 src/py/libcamera/meson.build create mode 100644 src/py/libcamera/pyenums.cpp create mode 100644 src/py/libcamera/pyenums_generated.cpp.in create mode 100644 src/py/libcamera/pymain.cpp create mode 100644 src/py/meson.build create mode 100644 subprojects/packagefiles/pybind11/meson.build create mode 100644 subprojects/pybind11.wrap create mode 100644 test/py/meson.build create mode 100755 test/py/unittests.py