[{"id":22945,"web_url":"https://patchwork.libcamera.org/comment/22945/","msgid":"<YnqGaKUQuYT9XTBB@pendragon.ideasonboard.com>","date":"2022-05-10T15:36:08","subject":"Re: [libcamera-devel] [PATCH] py: Fix gen-py-control-enums.py\n\treference","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Tue, May 10, 2022 at 05:21:07PM +0200, Kieran Bingham via libcamera-devel wrote:\n> Scripts should be referenced using the meson files() directive to ensure\n> the location is correctly identified with the relevant paths. This\n> prevents compilation failures if the working directory does not match\n> the source tree.\n> \n> Fixes: 6e92cb9dc49e (\"py: Generate control enums from yaml\")\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n> It seems in my testing, that this occurs on meson 57 and below, but\n> wasn't reproduced on meson 58. This fixes the issue anyway, and ensures\n> we are consistent in our usage of scripts internally.\n> ---\n\nLooks good to me,\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nI would still like to see a patch to use files() for gen_input_files\ntoo. I understand that Tomi is on it.\n\n>  src/py/libcamera/meson.build | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build\n> index 842db1ed3ddd..0cd7c75bb86c 100644\n> --- a/src/py/libcamera/meson.build\n> +++ b/src/py/libcamera/meson.build\n> @@ -22,10 +22,12 @@ gen_input_files = [\n>      'pyenums_generated.cpp.in',\n>  ]\n>  \n> +gen_py_control_enums = files('gen-py-control-enums.py')\n> +\n>  generated_sources = custom_target('py_gen_controls',\n>                                    input : gen_input_files,\n>                                    output : ['pyenums_generated.cpp'],\n> -                                  command : ['gen-py-control-enums.py', '-o', '@OUTPUT@', '@INPUT@'])\n> +                                  command : [gen_py_control_enums, '-o', '@OUTPUT@', '@INPUT@'])\n>  \n>  pycamera_sources += generated_sources","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 A2696C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 10 May 2022 15:36:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CA59565646;\n\tTue, 10 May 2022 17:36:15 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 42E7765643\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 May 2022 17:36:14 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7FFC6BA9;\n\tTue, 10 May 2022 17:36:13 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652196975;\n\tbh=rN5o789kH1BrZA7MzqXNOmpMZiLz7/3V58r4jkGFLiE=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=SpllEi4A8zD81uVp7cnUGtMsQXXchwlvvnLHLoYC4FIo7w0xT6f+0K/kNgcyrh6mB\n\tChpkExwANcNIsJwr8e//iOMksoH0IMC1uTUUNmSTZqDLh+NF+uvsYDW6XT87/Kgucn\n\tihGozBz8vsXSBATED7AL8mqFMo0d+EjwTKKGN4aWyt4e7yxXWwvU/Lx2tKAI1w39G7\n\ttu0nL6sb4kzahYLtU5zMuhz2AZ8FFpM3WnJzV05HwGM02IVyA8UJXASXyGI+bxk+Rb\n\tiAqJS4zfVNnGcvXuuM0IzjDNQYJ1ph3DJYQ0UHyJ15LDjhEl0TcPJivR2Sx45rAPVn\n\tBKpdw/j9IWJzg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652196973;\n\tbh=rN5o789kH1BrZA7MzqXNOmpMZiLz7/3V58r4jkGFLiE=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=MfV6hGk5fpoIWeg9OgLhfA2YoM4I/Rb9zExKqM0ObCBhNdHzasj6s5vm6WAnvlK5R\n\tR0iAHx131Eos33rftKrZtfK2pJt6x37opHucOlVl90AGWerN25YZDRBDnVPliw7b9H\n\tZgqOqOLy+Kduy1WsXTdLZf8WsByII7EdQpX+negI="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"MfV6hGk5\"; dkim-atps=neutral","Date":"Tue, 10 May 2022 18:36:08 +0300","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YnqGaKUQuYT9XTBB@pendragon.ideasonboard.com>","References":"<20220510152107.610191-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20220510152107.610191-1-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] py: Fix gen-py-control-enums.py\n\treference","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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22947,"web_url":"https://patchwork.libcamera.org/comment/22947/","msgid":"<e8338f9f-7196-2572-42af-68ffa321a74b@ideasonboard.com>","date":"2022-05-10T15:45:45","subject":"Re: [libcamera-devel] [PATCH] py: Fix gen-py-control-enums.py\n\treference","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/people/86/","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"content":"Hi Kieran,\n\nThanks for the patch,\n\nOn 5/10/22 20:51, Kieran Bingham via libcamera-devel wrote:\n> Scripts should be referenced using the meson files() directive to ensure\n> the location is correctly identified with the relevant paths. This\n> prevents compilation failures if the working directory does not match\n> the source tree.\n>\n> Fixes: 6e92cb9dc49e (\"py: Generate control enums from yaml\")\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n\nMakes sense,\n\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\n\n> ---\n> It seems in my testing, that this occurs on meson 57 and below, but\n> wasn't reproduced on meson 58. This fixes the issue anyway, and ensures\n> we are consistent in our usage of scripts internally.\n> ---\n>   src/py/libcamera/meson.build | 4 +++-\n>   1 file changed, 3 insertions(+), 1 deletion(-)\n>\n> diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build\n> index 842db1ed3ddd..0cd7c75bb86c 100644\n> --- a/src/py/libcamera/meson.build\n> +++ b/src/py/libcamera/meson.build\n> @@ -22,10 +22,12 @@ gen_input_files = [\n>       'pyenums_generated.cpp.in',\n>   ]\n>   \n> +gen_py_control_enums = files('gen-py-control-enums.py')\n> +\n>   generated_sources = custom_target('py_gen_controls',\n>                                     input : gen_input_files,\n>                                     output : ['pyenums_generated.cpp'],\n> -                                  command : ['gen-py-control-enums.py', '-o', '@OUTPUT@', '@INPUT@'])\n> +                                  command : [gen_py_control_enums, '-o', '@OUTPUT@', '@INPUT@'])\n>   \n>   pycamera_sources += generated_sources\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 8E776C0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 10 May 2022 15:45:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5365465644;\n\tTue, 10 May 2022 17:45:54 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A507F65643\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 May 2022 17:45:52 +0200 (CEST)","from [192.168.1.106] (unknown [103.238.109.13])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6856CB60;\n\tTue, 10 May 2022 17:45:51 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652197554;\n\tbh=EBhZl219XGRiNP3WXlbu6H1hS9+887jZIF4qVeL08QA=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=o/Ymww8CaBnqDYEM8YSDVgOz5j45Znr789h/2VQ6nFN+vSl4a4t/rNcImE314Dtoi\n\teAy2DD78/6WCxo1ez7S7tSclY3z17o94lGSWY7FBRldSgT3aUdIQ3EMvFJsR/BAtpP\n\t4JJ6CepLbEIEp+7jc9u0toPXvtSp81hHLWv9dQDo6ThqQpWAD/UtbYfjjvNdGgPlld\n\tPUh5pV6YKWsPIcWZAbd3Fd8Q5PX01PNjwISBln99aIsUhrscVUviDC4APo6UWTvKf5\n\tnGzwaWrJaT+C0LroBKTgcoS7DG11JGH8p+5pvLIPPjq4ejOmeyFCB29LaAfcfPYfZX\n\tyJcYenbLWujNw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652197552;\n\tbh=EBhZl219XGRiNP3WXlbu6H1hS9+887jZIF4qVeL08QA=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=O4c/59REshEtdRVSHS1/0a5CG4qRQaNQ4Mlve92vfsWDyRNpafSeBmhoQjRHKgQ5l\n\tuYoZux6UHsAZDboU7fUf2vskr+1hgOLinMwct1SikwGhQB73hewlV0ekeMXk+LHXqz\n\t5WjGYtExhsZzODioGJ5lgZnr3Kawd7dkX9230jQs="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"O4c/59RE\"; dkim-atps=neutral","Message-ID":"<e8338f9f-7196-2572-42af-68ffa321a74b@ideasonboard.com>","Date":"Tue, 10 May 2022 21:15:45 +0530","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.4.1","Content-Language":"en-US","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","References":"<20220510152107.610191-1-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20220510152107.610191-1-kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] py: Fix gen-py-control-enums.py\n\treference","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":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":22948,"web_url":"https://patchwork.libcamera.org/comment/22948/","msgid":"<8585684b-c270-e473-4686-ba93ef08f500@ideasonboard.com>","date":"2022-05-10T16:02:45","subject":"Re: [libcamera-devel] [PATCH] py: Fix gen-py-control-enums.py\n\treference","submitter":{"id":109,"url":"https://patchwork.libcamera.org/api/people/109/","name":"Tomi Valkeinen","email":"tomi.valkeinen@ideasonboard.com"},"content":"On 10/05/2022 18:21, Kieran Bingham wrote:\n> Scripts should be referenced using the meson files() directive to ensure\n> the location is correctly identified with the relevant paths. This\n> prevents compilation failures if the working directory does not match\n> the source tree.\n> \n> Fixes: 6e92cb9dc49e (\"py: Generate control enums from yaml\")\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n> It seems in my testing, that this occurs on meson 57 and below, but\n> wasn't reproduced on meson 58. This fixes the issue anyway, and ensures\n> we are consistent in our usage of scripts internally.\n> ---\n>   src/py/libcamera/meson.build | 4 +++-\n>   1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build\n> index 842db1ed3ddd..0cd7c75bb86c 100644\n> --- a/src/py/libcamera/meson.build\n> +++ b/src/py/libcamera/meson.build\n> @@ -22,10 +22,12 @@ gen_input_files = [\n>       'pyenums_generated.cpp.in',\n>   ]\n>   \n> +gen_py_control_enums = files('gen-py-control-enums.py')\n> +\n>   generated_sources = custom_target('py_gen_controls',\n>                                     input : gen_input_files,\n>                                     output : ['pyenums_generated.cpp'],\n> -                                  command : ['gen-py-control-enums.py', '-o', '@OUTPUT@', '@INPUT@'])\n> +                                  command : [gen_py_control_enums, '-o', '@OUTPUT@', '@INPUT@'])\n>   \n>   pycamera_sources += generated_sources\n>   \n\nReviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>\n\n  Tomi","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 A4A4FC0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 10 May 2022 16:02:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 03B5A65646;\n\tTue, 10 May 2022 18:02:50 +0200 (CEST)","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 90E9E65643\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 10 May 2022 18:02:48 +0200 (CEST)","from [192.168.1.111] (91-156-85-209.elisa-laajakaista.fi\n\t[91.156.85.209])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0F404B60;\n\tTue, 10 May 2022 18:02:48 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1652198570;\n\tbh=05VEhmQ6NJC95je1vAJWdGDdEEPYUAA9zqZgVb6bt+w=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=1h1bIh/BIUWKM3hxIDqpQgtxf4xno6bFttqJgUkvm4N8PU3HO/p8mXWlUynCbbzPQ\n\tn1F3fbCbR45B71+j2/mwEd2Wa8TF7WnllDRmVHbAEqU9R76rRGyMEzsHuQuDrt0g1P\n\t4k1IEsXpb50ppBNQ1S7STk9NuOwgIArRGMOkSve2yR7E7liOFxfpFkBWfyU6RM3vsp\n\t7PkzWVlMYxsSN67n8uufDGfpKmLr/DhoJjv1vLMXqIKzGI7LL7vVM9tMPTNUKaCtVq\n\tQvRigYfXVOu1G5Gpc5kNcpqHWX6bUL129SgvC5lZcdpBYdJM/5gYB4uUeQUNlaJ2Gm\n\tr3fdsflpTpL7w==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1652198568;\n\tbh=05VEhmQ6NJC95je1vAJWdGDdEEPYUAA9zqZgVb6bt+w=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=vulbKPct1tSK8W6Kpf7x0wBSmJK7fjwaGY6zLydTPZ+AdneeCfedOuY6RC3/69WGv\n\tjwMwhNLyZs/xJwW1d1wQElNfaBBenLme5Jv9orvMolM/MLHfby/swdClOjxJVsi07e\n\tzt1J41s7oa1J0jsg1eA1fp3zWxEqhUMH4e/tyP1E="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"vulbKPct\"; dkim-atps=neutral","Message-ID":"<8585684b-c270-e473-4686-ba93ef08f500@ideasonboard.com>","Date":"Tue, 10 May 2022 19:02:45 +0300","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.8.0","Content-Language":"en-US","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera devel <libcamera-devel@lists.libcamera.org>","References":"<20220510152107.610191-1-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20220510152107.610191-1-kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] py: Fix gen-py-control-enums.py\n\treference","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":"Tomi Valkeinen via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]