{"id":11214,"url":"https://patchwork.libcamera.org/api/1.1/patches/11214/?format=json","web_url":"https://patchwork.libcamera.org/patch/11214/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20210211071805.34963-4-paul.elder@ideasonboard.com>","date":"2021-02-11T07:17:58","name":"[libcamera-devel,v7,03/10] utils: ipc: add generator script","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":false,"hash":"31ab1a75c42a51e85ccea9e6ba734c1111c253fc","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/1.1/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/11214/mbox/","series":[{"id":1675,"url":"https://patchwork.libcamera.org/api/1.1/series/1675/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1675","date":"2021-02-11T07:17:55","name":"IPA isolation: Part 1: Core components","version":7,"mbox":"https://patchwork.libcamera.org/series/1675/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/11214/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/11214/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 62589BD162\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 11 Feb 2021 07:18:25 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2FD0761662;\n\tThu, 11 Feb 2021 08:18:25 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1C15C61634\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Feb 2021 08:18:24 +0100 (CET)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id F1C51BB8;\n\tThu, 11 Feb 2021 08:18:21 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"mvMz2mGJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1613027903;\n\tbh=huMt8xibhjz6qZc64Lu1HR8yY0FbJZx9spgh27nQ37c=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=mvMz2mGJ3yoSwsW7j9NoyR/cjQ2aKP3VUMxBLxsNLSu6BlyJIbsju+4gEYm8Fee4Y\n\tgchKlPlJGA9UqYCBCoX9Oz0VG3WMNw01nlVdH/HRDAwokDYvcqsl2NgBf4Vj9ySNY3\n\txB7TDrq7TkpmwfF7KVkSChnEO+77aND8PosNB9Uc=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 11 Feb 2021 16:17:58 +0900","Message-Id":"<20210211071805.34963-4-paul.elder@ideasonboard.com>","X-Mailer":"git-send-email 2.27.0","In-Reply-To":"<20210211071805.34963-1-paul.elder@ideasonboard.com>","References":"<20210211071805.34963-1-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH v7 03/10] utils: ipc: add generator script","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"We want to avoid changing our copy of mojo to make updates easier. Some\nparameters in the mojo generator script needs to be changed though; add\na wrapper script that sets these parameters.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n---\nNo change in v7\n\nNo change in v6\n\nNo change in v5\n\nNo change in v4\n\nChanges in v3:\n- add SPDX and copyright and file description block\n- add todo for sys.pycache_prefix for python3.8+\n\nChanges in v2:\n- add descriptions to python setup\n- disable pycache\n---\n utils/ipc/generate.py | 29 +++++++++++++++++++++++++++++\n 1 file changed, 29 insertions(+)\n create mode 100755 utils/ipc/generate.py","diff":"diff --git a/utils/ipc/generate.py b/utils/ipc/generate.py\nnew file mode 100755\nindex 00000000..8771e0a6\n--- /dev/null\n+++ b/utils/ipc/generate.py\n@@ -0,0 +1,29 @@\n+#!/usr/bin/env python3\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright (C) 2020, Google Inc.\n+#\n+# Author: Paul Elder <paul.elder@ideasonboard.com>\n+#\n+# generate.py - Run mojo code generator for generating libcamera IPC files\n+\n+import os\n+import sys\n+\n+# TODO set sys.pycache_prefix for >= python3.8\n+sys.dont_write_bytecode = True\n+\n+import mojo.public.tools.bindings.mojom_bindings_generator as generator\n+\n+def _GetModulePath(path, output_dir):\n+  return os.path.join(output_dir, path.relative_path())\n+\n+# Override the mojo code generator's generator list to only contain our\n+# libcamera generator\n+generator._BUILTIN_GENERATORS = {'libcamera': 'mojom_libcamera_generator'}\n+\n+# Override the mojo code generator's _GetModulePath method to not add\n+# the '-module' suffix when searching for mojo modules, so that we can\n+# pass the path to the mojom module without having to trim the '-module' suffix\n+generator._GetModulePath = _GetModulePath\n+\n+generator.main()\n","prefixes":["libcamera-devel","v7","03/10"]}