[{"id":28383,"web_url":"https://patchwork.libcamera.org/comment/28383/","msgid":"<871qawum4x.fsf@redhat.com>","date":"2024-01-05T10:09:50","subject":"Re: [libcamera-devel] [PATCH 6/8] utils: ipc: generate.py: Add\n\tbindings directory to Python path","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:\n\n> Newer mojo versions import a 'checks' module located in the bindings\n> directory. In preparation for a mojo update, add the directory to the\n> Python path make the import work.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\n\n> ---\n>  utils/ipc/generate.py | 2 ++\n>  1 file changed, 2 insertions(+)\n>\n> diff --git a/utils/ipc/generate.py b/utils/ipc/generate.py\n> index 8771e0a6b9e3..afaf018b49d1 100755\n> --- a/utils/ipc/generate.py\n> +++ b/utils/ipc/generate.py\n> @@ -12,6 +12,8 @@ import sys\n>  # TODO set sys.pycache_prefix for >= python3.8\n>  sys.dont_write_bytecode = True\n>  \n> +sys.path.insert(0, f'{os.path.dirname(__file__)}/mojo/public/tools/bindings')\n> +\n>  import mojo.public.tools.bindings.mojom_bindings_generator as generator\n>  \n>  def _GetModulePath(path, output_dir):","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 8583EBDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  5 Jan 2024 10:09:56 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3C28961D7F;\n\tFri,  5 Jan 2024 11:09:56 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D468561D7F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  5 Jan 2024 11:09:54 +0100 (CET)","from mail-wr1-f69.google.com (mail-wr1-f69.google.com\n\t[209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-120-sX31IU3_MZ6r2YNZd2qTNQ-1; Fri, 05 Jan 2024 05:09:52 -0500","by mail-wr1-f69.google.com with SMTP id\n\tffacd0b85a97d-336811fc1d7so926692f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 05 Jan 2024 02:09:52 -0800 (PST)","from nuthatch (ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\tf1-20020a5d4dc1000000b0033664ffaf5dsm1097047wru.37.2024.01.05.02.09.50\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 05 Jan 2024 02:09:50 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1704449396;\n\tbh=zjNM/VKZARqRNTTEc+RK1iJT6HudGn60V0rTdZRhp/U=;\n\th=To:In-Reply-To:References:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=bOBjXakQge2o+nd0jADkU181R18n+GlYUnsxutCaqGMT7exQ53AKfZqHmz7a/EjV2\n\tn/LLLGkH55UncC1M1iAEK+uDoXmVQ/XnlPIuSbJpv24K2pCgAiBt+yOkdQSVCg3rea\n\thqSyV2oMnSLWwgX5m4Ezdqq8qa+zKnUdk3utTZ7cRSvL1rWW2c1T8mwRszg8n6P/jq\n\ttT9okljv8bRhxOIYnr3jJGrbG2oTVH8J8YBGJTHzVk4iYyX5b2SYGy7HrbFxAZeeav\n\t31DhyOU8dHot0hS25Erqn6qsBqfCb1BUna+k/7fLnjacUtKSMj9XlWCH7T1F42tH4+\n\tE4/otG5cIyoqg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1704449394;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=cpc5qnU0s9ezHA7KKufFH2Ui4kPpA7j6iyPSKCmdRlE=;\n\tb=bwffUPx6a+PFIjIPqJ+eikhTGfV+asOPf2qXd09wUkuomrob3I9+uoy1XGv+MRToeIoC5G\n\thJRSkHAfclvIH3OXwwvRRVnJGM6L+oEz5A7kBeQ9HMQ4uPETB8YAoQa4fz2RiW9RFE1dYS\n\t+gjY6mKknqwHxpHA+oft+bM4nFLsOug="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"bwffUPx6\"; \n\tdkim-atps=neutral","X-MC-Unique":"sX31IU3_MZ6r2YNZd2qTNQ-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1704449391; x=1705054191;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=cpc5qnU0s9ezHA7KKufFH2Ui4kPpA7j6iyPSKCmdRlE=;\n\tb=kfA6thvSj947CRDt2qGidljJAGImAFszNCKr6DPnlELYSIBSep2RI/JDOKbuP+D/z/\n\temdTKR1mAdW8LKDtKs4NKwvsCbSgrJpel6tXidYKoi4w6o7DnHR581smj7eZlsBCmOyu\n\tfSD5WI5ioUn8YQeaYuRQqsEoIuz3NiWLR4bMXJ7KBioN7VtF4F/mctyYNS8yerCmpEA2\n\tfqnaqoiuDNENYtiSCbPoi336PFywUcqE6jSUBgECK3vPg2Uv7Ozsn6BKwCdA0BTslSaR\n\tZ/WqfXnOUNDVxkCwl4Ee1Ma7FRt75nUWElqf3Q5KU5XCQnmIsWiby/tEwtA0lgdFQ+z2\n\tcG3Q==","X-Gm-Message-State":"AOJu0Yz9jZK2cJew1QM2eYjk1LcQclde8ulTZ9bcuVgPje1zOtM4QTsC\n\tLbhbOfIjYOuuQ2nH8IC3cvk7HESp2uKVDjtAYGGTkOvs5axF6mN53hwqyRDgHD5c44ZXCOO0RND\n\t/XsA4wrntQ454DPtURtuEMp7n/m9RBPGVi/v1QpZWpg==","X-Received":["by 2002:a5d:5547:0:b0:336:8848:e7e5 with SMTP id\n\tg7-20020a5d5547000000b003368848e7e5mr1095460wrw.15.1704449391226; \n\tFri, 05 Jan 2024 02:09:51 -0800 (PST)","by 2002:a5d:5547:0:b0:336:8848:e7e5 with SMTP id\n\tg7-20020a5d5547000000b003368848e7e5mr1095455wrw.15.1704449391010; \n\tFri, 05 Jan 2024 02:09:51 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IE9F8LFfr7sO+cobhRmJkct+HjQn+zvz81i8+r69eud214vzXRs/29pwoFc3stfJ2hNfwN8vw==","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","In-Reply-To":"<20240104151548.2589-7-laurent.pinchart@ideasonboard.com>\n\t(Laurent Pinchart's message of \"Thu, 4 Jan 2024 17:15:46 +0200\")","References":"<20240104151548.2589-1-laurent.pinchart@ideasonboard.com>\n\t<20240104151548.2589-7-laurent.pinchart@ideasonboard.com>","Date":"Fri, 05 Jan 2024 11:09:50 +0100","Message-ID":"<871qawum4x.fsf@redhat.com>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","Subject":"Re: [libcamera-devel] [PATCH 6/8] utils: ipc: generate.py: Add\n\tbindings directory to Python path","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>","From":"Milan Zamazal via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org, Khem Raj <raj.khem@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28406,"web_url":"https://patchwork.libcamera.org/comment/28406/","msgid":"<170480230140.3044059.1846817091147802815@ping.linuxembedded.co.uk>","date":"2024-01-09T12:11:41","subject":"Re: [libcamera-devel] [PATCH 6/8] utils: ipc: generate.py: Add\n\tbindings directory to Python path","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart via libcamera-devel (2024-01-04 15:15:46)\n> Newer mojo versions import a 'checks' module located in the bindings\n> directory. In preparation for a mojo update, add the directory to the\n> Python path make the import work.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  utils/ipc/generate.py | 2 ++\n>  1 file changed, 2 insertions(+)\n> \n> diff --git a/utils/ipc/generate.py b/utils/ipc/generate.py\n> index 8771e0a6b9e3..afaf018b49d1 100755\n> --- a/utils/ipc/generate.py\n> +++ b/utils/ipc/generate.py\n> @@ -12,6 +12,8 @@ import sys\n>  # TODO set sys.pycache_prefix for >= python3.8\n>  sys.dont_write_bytecode = True\n>  \n> +sys.path.insert(0, f'{os.path.dirname(__file__)}/mojo/public/tools/bindings')\n> +\n>  import mojo.public.tools.bindings.mojom_bindings_generator as generator\n>  \n>  def _GetModulePath(path, output_dir):\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","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 1255BC323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  9 Jan 2024 12:11:46 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B28F362B49;\n\tTue,  9 Jan 2024 13:11:45 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 11BF862B30\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Jan 2024 13:11:44 +0100 (CET)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 18DAB552;\n\tTue,  9 Jan 2024 13:10:40 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1704802305;\n\tbh=j4dCiQjmLiU/vlHM7/ax95RxaN4pa9fWZWkjxzZe2X8=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=GkUThFUOJLO4vB1XTImGSE+3Qy9xSJdBou4efevQ+0Kfziq+Q4dxxUxHUq28I8bXS\n\tYZI9twId6bVOlnGfu1R9y1aUn6pcKiJEjVOtAN2x7hPeq3FAalcc4klmVUKXQyFv3D\n\tJM0VqoFcX4disZ0KQpVvDqBy2ijbQFImCw7uddtfCQJVY4SwpUPh/alMcOfK7s+UQp\n\tRMKG3MUcrNJjXhlhwCYDUPbgiQgiJvtiunjksIYRC9FrYW43ltL7tOwdqahEhMhMAS\n\tW1ol1O5KuZDo+ra9bcmX3y4/4ZBEr+Oc4tZCu/ano7Z6LkCaZKNlaL+W7/MWrMyO3m\n\twDHYPQXPFKbuw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1704802240;\n\tbh=j4dCiQjmLiU/vlHM7/ax95RxaN4pa9fWZWkjxzZe2X8=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=bAg7hseyNoNJFxG53+4LJ2sp8SiKt2TCcGyDU8xVMk3j/dlUX2ijaiYaDu9O0dLVj\n\tkUEikUGpqIjO30dh/QpwINozeLTk+pjriwF2yWMPXC56AVLHbSbNIepffs7uYVX1E2\n\tJwtWXBwxNJL0a5IxRt5ftZGiww28dg69s6rKsEBw="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"bAg7hsey\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240104151548.2589-7-laurent.pinchart@ideasonboard.com>","References":"<20240104151548.2589-1-laurent.pinchart@ideasonboard.com>\n\t<20240104151548.2589-7-laurent.pinchart@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 09 Jan 2024 12:11:41 +0000","Message-ID":"<170480230140.3044059.1846817091147802815@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH 6/8] utils: ipc: generate.py: Add\n\tbindings directory to Python path","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Khem Raj <raj.khem@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]