[{"id":14281,"web_url":"https://patchwork.libcamera.org/comment/14281/","msgid":"<X9zRUNDhBaro27nV@wyvern>","date":"2020-12-18T15:57:04","subject":"Re: [libcamera-devel] [PATCH v5 03/23] utils: ipc: add parser script","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Paul,\n\nThanks for your patch.\n\nOn 2020-12-05 19:30:46 +0900, Paul Elder wrote:\n> On some systems, python2 might still be the default python. Enforce\n> python3 by wrapping the mojo parser script in a python3 script. This\n> also has the benefit of not modifying mojo.\n> \n> Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> \n> ---\n> No change in v5\n> \n> No change in v4\n> \n> New in v3\n> ---\n>  utils/ipc/parser.py | 20 ++++++++++++++++++++\n>  1 file changed, 20 insertions(+)\n>  create mode 100755 utils/ipc/parser.py\n> \n> diff --git a/utils/ipc/parser.py b/utils/ipc/parser.py\n> new file mode 100755\n> index 00000000..f46820fa\n> --- /dev/null\n> +++ b/utils/ipc/parser.py\n> @@ -0,0 +1,20 @@\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> +# parser.py - Run mojo parser with python3\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> +# Make sure that mojom_parser.py can import mojom\n> +sys.path.append(f'{os.path.dirname(__file__)}/mojo/public/tools/mojom')\n> +\n> +import mojo.public.tools.mojom.mojom_parser as parser\n> +\n> +parser.Run(sys.argv[1:])\n> -- \n> 2.27.0\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","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 91AA6C0F1A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 18 Dec 2020 15:57:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 003B961595;\n\tFri, 18 Dec 2020 16:57:08 +0100 (CET)","from mail-lf1-x141.google.com (mail-lf1-x141.google.com\n\t[IPv6:2a00:1450:4864:20::141])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A4DC16052C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 18 Dec 2020 16:57:07 +0100 (CET)","by mail-lf1-x141.google.com with SMTP id 23so6564816lfg.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 18 Dec 2020 07:57:07 -0800 (PST)","from localhost ([185.224.57.161]) by smtp.gmail.com with ESMTPSA id\n\t204sm964949lfj.269.2020.12.18.07.57.05\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 18 Dec 2020 07:57:06 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"Pjo4EFJD\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=W29MbOebea5dLdSm3J+vHdTZ3je4Jog2hGYZ7YdMk5g=;\n\tb=Pjo4EFJDTPFmwhDKf3NLuyXh2TSitOMmA75bhVqomhSspIKIIVtJeWJl3FqBO/Svi7\n\t2v0czBRy6JBmsbxyhb1YfJkanfNcJ56N9tqJXTxT/sFzMuvjuvQJrRuAd6LuFPxVIIDk\n\t9u1PdNjgW7jOn/h0Bh2PJ+O5f015vEgW1u9v+MVepkxyvCeax/GsaUT1bxlht1SXJ6zw\n\taG02kC+4kGIbhcUdfujeNcAhTV66gEWETquanr3lBzQQN6H1jZb9y/qSEEqJGebBhHPf\n\t+jlarIxnA4899+3spdMeNRSus5VmC0By8ZVD3aMGnex5o71P7kY81DLDnuDg8s7+oyHe\n\tSWGg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=W29MbOebea5dLdSm3J+vHdTZ3je4Jog2hGYZ7YdMk5g=;\n\tb=c3sS6K6uwfdN9F9NIGa1WexzaSFz6MOXll0KewYSUDzCvvsYvwb06bNm/OSadq/KUT\n\t0LVTcfSkipkYAYL3vjAdM01SEYqjBw6kzL6WuJ1fkdxSVTUzBoUEpjZNbeodTCUVISGI\n\tYU86+nmXQDn1RbRMTK0a2ee+xDdx3h/8tBN4Gd7xkkZEr4aAhgc90Bak6JiCKHVQi6Kq\n\tuWl8S7b9H3XbB0OF6IBw2MGBLNC8Dy2gUWAp54t3w+aJVuDk+usR/uaNzyLqATtUwyOU\n\tw3zpEcINSeq8KfJb1NmQRnQnrTHvB57EgL2/tc9LtFqC0//4g+RJtBhx6tUPJ4Dz5Pao\n\tMgrg==","X-Gm-Message-State":"AOAM531d2WxaY5oxGs88D/+ufYKs7+QMOxBjxkY3ahSKESRpR35BxBX1\n\tNQ8HZJFF9nmketfhdwj72oiNycm/OKGguApP","X-Google-Smtp-Source":"ABdhPJyGXwULXITgd6bXuz0UrOI1ugx6dEXHVTPdzwCovOEpkSQ59jbasEBo0XSOumDfW5sgFT1VdQ==","X-Received":"by 2002:a2e:984c:: with SMTP id e12mr2099637ljj.71.1608307027027;\n\tFri, 18 Dec 2020 07:57:07 -0800 (PST)","Date":"Fri, 18 Dec 2020 16:57:04 +0100","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<X9zRUNDhBaro27nV@wyvern>","References":"<20201205103106.242080-1-paul.elder@ideasonboard.com>\n\t<20201205103106.242080-4-paul.elder@ideasonboard.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201205103106.242080-4-paul.elder@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v5 03/23] utils: ipc: add parser 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>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]