[{"id":24549,"web_url":"https://patchwork.libcamera.org/comment/24549/","msgid":"<bfd00345-4b57-1f59-aba9-997d530f7980@ideasonboard.com>","date":"2022-08-11T14:11:07","subject":"Re: [libcamera-devel] [PATCH] build: Fix python dependency","submitter":{"id":109,"url":"https://patchwork.libcamera.org/api/people/109/","name":"Tomi Valkeinen","email":"tomi.valkeinen@ideasonboard.com"},"content":"On 11/08/2022 13:54, Martin Kletzander via libcamera-devel wrote:\n> Building with pycamera fails due to dependency search for 'python3'.  Fix that\n> by using meson's python module which searches for the proper files and various\n> versions.\n> \n> Signed-off-by: Martin Kletzander <nert.pinx@gmail.com>\n> ---\n>   src/py/libcamera/meson.build | 9 +++++----\n>   1 file changed, 5 insertions(+), 4 deletions(-)\n> \n> diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build\n> index eb8845388692..cf2e9395de38 100644\n> --- a/src/py/libcamera/meson.build\n> +++ b/src/py/libcamera/meson.build\n> @@ -1,8 +1,9 @@\n>   # SPDX-License-Identifier: CC0-1.0\n>   \n> -py3_dep = dependency('python3', required : get_option('pycamera'))\n> +pymod = import('python')\n> +py3 = pymod.find_installation('python3', required : get_option('pycamera'))\n>   \n> -if not py3_dep.found()\n> +if not py3.found()\n>       pycamera_enabled = false\n>       subdir_done()\n>   endif\n> @@ -60,7 +61,7 @@ pycamera_sources += custom_target('py_gen_formats',\n>   \n>   pycamera_deps = [\n>       libcamera_public,\n> -    py3_dep,\n> +    py3.dependency(),\n>       pybind11_dep,\n>   ]\n>   \n> @@ -71,7 +72,7 @@ pycamera_args = [\n>       '-DLIBCAMERA_BASE_PRIVATE',\n>   ]\n>   \n> -destdir = get_option('libdir') / ('python' + py3_dep.version()) / 'site-packages' / 'libcamera'\n> +destdir = get_option('libdir') / ('python' + py3.language_version()) / 'site-packages' / 'libcamera'\n>   \n>   pycamera = shared_module('_libcamera',\n>                            pycamera_sources,\n\nThere was a similar patch posted some time back:\n\nhttps://lists.libcamera.org/pipermail/libcamera-devel/2022-May/030423.html\n\nThis doesn't work when cross-compiling.\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 D8CD7BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 11 Aug 2022 14:11:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2B5B56332A;\n\tThu, 11 Aug 2022 16:11:12 +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 001D66330E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Aug 2022 16:11:10 +0200 (CEST)","from [192.168.1.111] (91-158-154-79.elisa-laajakaista.fi\n\t[91.158.154.79])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5C142593;\n\tThu, 11 Aug 2022 16:11:10 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1660227072;\n\tbh=fheIA/0nWjvHzthextO60AtDtVIg0xLa3BIg8wSA7QE=;\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=XhkSFx8ArFFuHJZM8oBUo3sB+uJ/vbgzZMT+HsmFvTi1cl1dcesJExSnTNO6OOhLi\n\t4kfe4t2GIAPj4Q8Z+w2TLdOWhl/WyBCt4qala5RE31LTanbOpMlwcwbAmECatpnwrM\n\tQmhK7YCvoWACb6u5OwCj0+ILb84oqSbZDpsIXV76pVShHf2MMVAxubJJWStyD834np\n\t+LZTJ1H0gGdAeOz5CkXPBmwdojy3M+9RpnQj7j40wkbcayBz2jKucD7xRjv5w3xLkO\n\tH52jx9PFaLiiXqnmwdK6B0/05m0yxiRAnhXBuar7jUu96wOM0gkxrwQwM/RWsaOEJZ\n\t/+rng2SFm6ItQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1660227070;\n\tbh=fheIA/0nWjvHzthextO60AtDtVIg0xLa3BIg8wSA7QE=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=OGfdAA/1VlIEObnzYZDqp9qNr1kyC5StiR2CTf+eFVFElKkvdhVfUieOISV4bk6NG\n\tHuJCq3b4+1EPjD5G7nIfrCHhnxNBmCshcqhbisUQWEdcaFchWdVqYD+lKBhPm+3C/3\n\t3QFkqju9nR/YmbomoMkvaljF5YyuBM4aAfJ0Pbwo="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"OGfdAA/1\"; dkim-atps=neutral","Message-ID":"<bfd00345-4b57-1f59-aba9-997d530f7980@ideasonboard.com>","Date":"Thu, 11 Aug 2022 17:11:07 +0300","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101\n\tThunderbird/91.11.0","Content-Language":"en-US","To":"Martin Kletzander <nert.pinx@gmail.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<beec98c3ab67cb75851c1108f5c5eef29baa7f20.1660215299.git.nert.pinx@gmail.com>","In-Reply-To":"<beec98c3ab67cb75851c1108f5c5eef29baa7f20.1660215299.git.nert.pinx@gmail.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] build: Fix python dependency","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>"}},{"id":24550,"web_url":"https://patchwork.libcamera.org/comment/24550/","msgid":"<YvUT+b5jGor6Bwt6@pendragon.ideasonboard.com>","date":"2022-08-11T14:36:41","subject":"Re: [libcamera-devel] [PATCH] build: Fix python dependency","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Thu, Aug 11, 2022 at 05:11:07PM +0300, Tomi Valkeinen via libcamera-devel wrote:\n> On 11/08/2022 13:54, Martin Kletzander via libcamera-devel wrote:\n> > Building with pycamera fails due to dependency search for 'python3'.  Fix that\n> > by using meson's python module which searches for the proper files and various\n> > versions.\n> > \n> > Signed-off-by: Martin Kletzander <nert.pinx@gmail.com>\n> > ---\n> >   src/py/libcamera/meson.build | 9 +++++----\n> >   1 file changed, 5 insertions(+), 4 deletions(-)\n> > \n> > diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build\n> > index eb8845388692..cf2e9395de38 100644\n> > --- a/src/py/libcamera/meson.build\n> > +++ b/src/py/libcamera/meson.build\n> > @@ -1,8 +1,9 @@\n> >   # SPDX-License-Identifier: CC0-1.0\n> >   \n> > -py3_dep = dependency('python3', required : get_option('pycamera'))\n> > +pymod = import('python')\n> > +py3 = pymod.find_installation('python3', required : get_option('pycamera'))\n> >   \n> > -if not py3_dep.found()\n> > +if not py3.found()\n> >       pycamera_enabled = false\n> >       subdir_done()\n> >   endif\n> > @@ -60,7 +61,7 @@ pycamera_sources += custom_target('py_gen_formats',\n> >   \n> >   pycamera_deps = [\n> >       libcamera_public,\n> > -    py3_dep,\n> > +    py3.dependency(),\n> >       pybind11_dep,\n> >   ]\n> >   \n> > @@ -71,7 +72,7 @@ pycamera_args = [\n> >       '-DLIBCAMERA_BASE_PRIVATE',\n> >   ]\n> >   \n> > -destdir = get_option('libdir') / ('python' + py3_dep.version()) / 'site-packages' / 'libcamera'\n> > +destdir = get_option('libdir') / ('python' + py3.language_version()) / 'site-packages' / 'libcamera'\n> >   \n> >   pycamera = shared_module('_libcamera',\n> >                            pycamera_sources,\n> \n> There was a similar patch posted some time back:\n> \n> https://lists.libcamera.org/pipermail/libcamera-devel/2022-May/030423.html\n> \n> This doesn't work when cross-compiling.\n\nTomi, would you be able to resume discussions with the meson developers\nto see how this could be fixed ?","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 9D8BAC3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 11 Aug 2022 14:36:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C2E586332A;\n\tThu, 11 Aug 2022 16:36:56 +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 5143D6330E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Aug 2022 16:36:55 +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 B258349C;\n\tThu, 11 Aug 2022 16:36:54 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1660228616;\n\tbh=FSobSaFlhQdBlFP9vWtxLY1/FQHMPLgQYkL9fdTDIGA=;\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=wz2/X1K4tJMwwLRY/qM2ybXUB+463fo7LewN9LxqbCp36T0LBIA2zuq4djG4+ugNN\n\tWUGY1peMhixZul6Kyy0LdW5iwOd8o56TXl1fWk8eyzcI6PythlOKO1c22XrJ5JZMZP\n\tJWziu2P0nxmRvEp2UysN/Bt65B5s8fuKWnjUovCvFnddVoNrOliMQTUfRt58Rsr4Uv\n\tg7GghiT1tiHt73ldexiD0DS+fL9Km3Yxs6CPwiVqwa7BNx4fIHMk51d8YKIVVI7vXR\n\txDDJVgJNl6c2Sv74+kshqKzfPDMfjZsK3pQxhfYZ7Y+WzQJCxjYynBzIVgfpZBb7vp\n\te5CMNBqPp2IFg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1660228614;\n\tbh=FSobSaFlhQdBlFP9vWtxLY1/FQHMPLgQYkL9fdTDIGA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=j5Mt/Mqskk6ziBjM7Chr1MwxysKFlWHzdx9YwU2YSTdFmHUMIJLZo3CQkb9RkNl7J\n\ttyIZZZ58JBGUsnWGBPkboiVzvPncOk4cYZwv3vyiZ/brp1qautVF1HWn/4/PE9RPXc\n\tDfKuD3edWxLo/80+F69UP1kNrltrgCg256GSBDSA="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"j5Mt/Mqs\"; dkim-atps=neutral","Date":"Thu, 11 Aug 2022 17:36:41 +0300","To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Message-ID":"<YvUT+b5jGor6Bwt6@pendragon.ideasonboard.com>","References":"<beec98c3ab67cb75851c1108f5c5eef29baa7f20.1660215299.git.nert.pinx@gmail.com>\n\t<bfd00345-4b57-1f59-aba9-997d530f7980@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<bfd00345-4b57-1f59-aba9-997d530f7980@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] build: Fix python dependency","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@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24551,"web_url":"https://patchwork.libcamera.org/comment/24551/","msgid":"<YvUj6sxd0KMAUqDD@wheatley>","date":"2022-08-11T15:44:42","subject":"Re: [libcamera-devel] [PATCH] build: Fix python dependency","submitter":{"id":132,"url":"https://patchwork.libcamera.org/api/people/132/","name":"Martin Kletzander","email":"nert.pinx@gmail.com"},"content":"On Thu, Aug 11, 2022 at 05:36:41PM +0300, Laurent Pinchart wrote:\n>On Thu, Aug 11, 2022 at 05:11:07PM +0300, Tomi Valkeinen via libcamera-devel wrote:\n>> On 11/08/2022 13:54, Martin Kletzander via libcamera-devel wrote:\n>> > Building with pycamera fails due to dependency search for 'python3'.  Fix that\n>> > by using meson's python module which searches for the proper files and various\n>> > versions.\n>> >\n>> > Signed-off-by: Martin Kletzander <nert.pinx@gmail.com>\n>> > ---\n>> >   src/py/libcamera/meson.build | 9 +++++----\n>> >   1 file changed, 5 insertions(+), 4 deletions(-)\n>> >\n>> > diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build\n>> > index eb8845388692..cf2e9395de38 100644\n>> > --- a/src/py/libcamera/meson.build\n>> > +++ b/src/py/libcamera/meson.build\n>> > @@ -1,8 +1,9 @@\n>> >   # SPDX-License-Identifier: CC0-1.0\n>> >\n>> > -py3_dep = dependency('python3', required : get_option('pycamera'))\n>> > +pymod = import('python')\n>> > +py3 = pymod.find_installation('python3', required : get_option('pycamera'))\n>> >\n>> > -if not py3_dep.found()\n>> > +if not py3.found()\n>> >       pycamera_enabled = false\n>> >       subdir_done()\n>> >   endif\n>> > @@ -60,7 +61,7 @@ pycamera_sources += custom_target('py_gen_formats',\n>> >\n>> >   pycamera_deps = [\n>> >       libcamera_public,\n>> > -    py3_dep,\n>> > +    py3.dependency(),\n>> >       pybind11_dep,\n>> >   ]\n>> >\n>> > @@ -71,7 +72,7 @@ pycamera_args = [\n>> >       '-DLIBCAMERA_BASE_PRIVATE',\n>> >   ]\n>> >\n>> > -destdir = get_option('libdir') / ('python' + py3_dep.version()) / 'site-packages' / 'libcamera'\n>> > +destdir = get_option('libdir') / ('python' + py3.language_version()) / 'site-packages' / 'libcamera'\n>> >\n>> >   pycamera = shared_module('_libcamera',\n>> >                            pycamera_sources,\n>>\n>> There was a similar patch posted some time back:\n>>\n>> https://lists.libcamera.org/pipermail/libcamera-devel/2022-May/030423.html\n>>\n\nOh, sorry for missing that.  I just started looking into libcamera and this was\nthe first thing I found when I wanted to build with pycamera.  I guess\n\n>> This doesn't work when cross-compiling.\n>\n>Tomi, would you be able to resume discussions with the meson developers\n>to see how this could be fixed ?\n>\n\nI guess this could be worked around in the meson file, but since pycamera\nsupport is experimental I guess you want a cleaner solution and don't have to\nwork around it for now.  I'll see what can be done with meson.\n\nHave a nice day,\nMartin","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 9941CC3272\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 11 Aug 2022 15:44:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D425E6332A;\n\tThu, 11 Aug 2022 17:44:44 +0200 (CEST)","from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com\n\t[IPv6:2a00:1450:4864:20::32c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 86CFA6330E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Aug 2022 17:44:43 +0200 (CEST)","by mail-wm1-x32c.google.com with SMTP id h1so428949wmd.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 11 Aug 2022 08:44:43 -0700 (PDT)","from wheatley.localdomain (nat-pool-brq-t.redhat.com.\n\t[213.175.37.10]) by smtp.gmail.com with ESMTPSA id\n\tbd26-20020a05600c1f1a00b003a2ed2a40e4sm4281114wmb.17.2022.08.11.08.44.42\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 11 Aug 2022 08:44:42 -0700 (PDT)","by wheatley.localdomain (Postfix, from userid 1000)\n\tid 1BB278CF5563; Thu, 11 Aug 2022 17:44:42 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1660232684;\n\tbh=we4n7mRRh2RK2i7+DMY6IS7GWXyWYAvgqrpDnJIf5m4=;\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=bplV+1ehBAMZ4eHPJXbrh3epB0a+OxaZDgjRKpNfUWCFRDw5jwbbJJRWohXMhO4b9\n\t/OAyRuOQlhU+wkDUmlHd/USBnO9aHhhkz/CyqUkPFzwTtlUF9ZZbnlilV2Fa1tM3Pc\n\tdc6lUnIsrNW9iB1T6M/lBYqRcwm9hbDNlBKwpArhAFc7e+D8s/RDQ+2uIsyQbbiDbj\n\teuSWcEdG/CwxWxJp3iwUjfjqt8mDNnZJSxdtoqzvHCMCDPrClMTtROe1kOPJGzCALj\n\tYg2JP0Njflprkva5jM1jLEwGKi2Ok2BTLm7Yx7YWO9M3WqLuGUv714Tk2QqylTFPL8\n\tquzTOvF4tsJJw==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=in-reply-to:content-disposition:mime-version:references:message-id\n\t:subject:cc:to:from:date:from:to:cc;\n\tbh=30BA0lkUHGsiU30E9su9upOGXs9k34egA7imZU5g7OI=;\n\tb=BhuQnsRfTDmwumN0AHeobrBOJhz3iV5n3mzk12POejIvOfO9qxhlfzvB7yChlTGICL\n\ttYZeDrhKtrpkSKYHXTYWfL/rxhesA+McQ4Avf5EL3rg6LiM2147wd0dDTsY5fEvgMunQ\n\theAxa+fg+2lf/DH0JohpqJ9dA//06DNLBeL5KEGqGb1yX3AmN19rLydG46kD+/VcaQSM\n\tcGoaF2/Fdu/QLmd7//KYwHEsnkN0g0joUdo1NWdtbyCe2c7O5OP3cX9W8SCmXJR7OM6S\n\tccnB/0xFF3rPlwV7OQNB4NCALlnJ44IUfYMMvKJbNXxReMVRlMpYn27UEsr/wPWy0mKA\n\tpR3Q=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"BhuQnsRf\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=in-reply-to:content-disposition:mime-version:references:message-id\n\t:subject:cc:to:from:date:x-gm-message-state:from:to:cc;\n\tbh=30BA0lkUHGsiU30E9su9upOGXs9k34egA7imZU5g7OI=;\n\tb=A4AbXWqDV4ZCUusNg2jTVn9YdPlSuFPexU/KuUp1qEasx0D1YD8eQ2m1lzrnHp5hnr\n\tLLNuSvUc2nBPBv9e/ScTQ1+Jb6GqtecpRzqk9qnpaqJVDYmhh9Xt8kpOGApMwqyWu38I\n\tiDK+RtULcWGGwrHVdjtI6GTwgR+ascm/GO2s1BI0uz8AMOoafl1htizQpFHqMnVdmhlC\n\tyfeJgwhyVL0Y9XsH3LnMPV0f5x5Trkd4JFqRWw583F1da+Vaw0ZnisBoBu+CcQu3SnKL\n\tHnxanTgKSUfz6NCMcDxrGIIs7u2USpyrIzFOGdccJ/49LFcKcR29FGYZB5JptfLEugIo\n\tGgeQ==","X-Gm-Message-State":"ACgBeo1jmaE/OJW/dCak4JZcD+haeHIz6mD/1IWtiNqJHmLbD944pNs3\n\tvnngyDGM5SW9k8hXBZwhMOUOTPy+vN8=","X-Google-Smtp-Source":"AA6agR6v4QKcfqp83WTmlCkzPjErBjlzzGIqh1TDH8j4JQBjDhA0Rtr8pXHCCwNlQ04KFlMnM+vKgQ==","X-Received":"by 2002:a05:600c:b4f:b0:3a5:c31f:b565 with SMTP id\n\tk15-20020a05600c0b4f00b003a5c31fb565mr525231wmr.186.1660232682985; \n\tThu, 11 Aug 2022 08:44:42 -0700 (PDT)","Date":"Thu, 11 Aug 2022 17:44:42 +0200","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Message-ID":"<YvUj6sxd0KMAUqDD@wheatley>","References":"<beec98c3ab67cb75851c1108f5c5eef29baa7f20.1660215299.git.nert.pinx@gmail.com>\n\t<bfd00345-4b57-1f59-aba9-997d530f7980@ideasonboard.com>\n\t<YvUT+b5jGor6Bwt6@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii; format=flowed","Content-Disposition":"inline","In-Reply-To":"<YvUT+b5jGor6Bwt6@pendragon.ideasonboard.com>","X-Clacks-Overhead":"GNU Terry Pratchett","Subject":"Re: [libcamera-devel] [PATCH] build: Fix python dependency","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":"Martin Kletzander via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Martin Kletzander <nert.pinx@gmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":24699,"web_url":"https://patchwork.libcamera.org/comment/24699/","msgid":"<Yv7p3zriypZmlEBb@pendragon.ideasonboard.com>","date":"2022-08-19T01:39:43","subject":"Re: [libcamera-devel] [PATCH] build: Fix python dependency","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Martin,\n\nOn Thu, Aug 11, 2022 at 05:44:42PM +0200, Martin Kletzander wrote:\n> On Thu, Aug 11, 2022 at 05:36:41PM +0300, Laurent Pinchart wrote:\n> >On Thu, Aug 11, 2022 at 05:11:07PM +0300, Tomi Valkeinen via libcamera-devel wrote:\n> >> On 11/08/2022 13:54, Martin Kletzander via libcamera-devel wrote:\n> >> > Building with pycamera fails due to dependency search for 'python3'.  Fix that\n> >> > by using meson's python module which searches for the proper files and various\n> >> > versions.\n> >> >\n> >> > Signed-off-by: Martin Kletzander <nert.pinx@gmail.com>\n> >> > ---\n> >> >   src/py/libcamera/meson.build | 9 +++++----\n> >> >   1 file changed, 5 insertions(+), 4 deletions(-)\n> >> >\n> >> > diff --git a/src/py/libcamera/meson.build b/src/py/libcamera/meson.build\n> >> > index eb8845388692..cf2e9395de38 100644\n> >> > --- a/src/py/libcamera/meson.build\n> >> > +++ b/src/py/libcamera/meson.build\n> >> > @@ -1,8 +1,9 @@\n> >> >   # SPDX-License-Identifier: CC0-1.0\n> >> >\n> >> > -py3_dep = dependency('python3', required : get_option('pycamera'))\n> >> > +pymod = import('python')\n> >> > +py3 = pymod.find_installation('python3', required : get_option('pycamera'))\n> >> >\n> >> > -if not py3_dep.found()\n> >> > +if not py3.found()\n> >> >       pycamera_enabled = false\n> >> >       subdir_done()\n> >> >   endif\n> >> > @@ -60,7 +61,7 @@ pycamera_sources += custom_target('py_gen_formats',\n> >> >\n> >> >   pycamera_deps = [\n> >> >       libcamera_public,\n> >> > -    py3_dep,\n> >> > +    py3.dependency(),\n> >> >       pybind11_dep,\n> >> >   ]\n> >> >\n> >> > @@ -71,7 +72,7 @@ pycamera_args = [\n> >> >       '-DLIBCAMERA_BASE_PRIVATE',\n> >> >   ]\n> >> >\n> >> > -destdir = get_option('libdir') / ('python' + py3_dep.version()) / 'site-packages' / 'libcamera'\n> >> > +destdir = get_option('libdir') / ('python' + py3.language_version()) / 'site-packages' / 'libcamera'\n> >> >\n> >> >   pycamera = shared_module('_libcamera',\n> >> >                            pycamera_sources,\n> >>\n> >> There was a similar patch posted some time back:\n> >>\n> >> https://lists.libcamera.org/pipermail/libcamera-devel/2022-May/030423.html\n> \n> Oh, sorry for missing that.  I just started looking into libcamera and this was\n> the first thing I found when I wanted to build with pycamera.  I guess\n> \n> >> This doesn't work when cross-compiling.\n> >\n> > Tomi, would you be able to resume discussions with the meson developers\n> > to see how this could be fixed ?\n> \n> I guess this could be worked around in the meson file, but since pycamera\n> support is experimental I guess you want a cleaner solution and don't have to\n> work around it for now.  I'll see what can be done with meson.\n\nWorkarounds are OK if no clean solution is possible, but if you could\ncheck with the meson developers (they've been very supportive so far),\nthat would be great.","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 2DE4BBE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 19 Aug 2022 01:39:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7957661FC0;\n\tFri, 19 Aug 2022 03:39:47 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 70043603E2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 19 Aug 2022 03:39:46 +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 ED5233F1;\n\tFri, 19 Aug 2022 03:39:45 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1660873187;\n\tbh=nrd68zF+lLjYZL6w29T2ANHlTDAfjV5CcKzsh4PAlW8=;\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=O9F+qZ6EXg4qd++7GFj6ODdXFHTCjqRX0PCYjOjVsQC5sfx1loIn2z1zqHkagMVlw\n\tPGtkybyMgBwVyY4VpOkQU08F6gMjVeEtP8Mzra0sftDyd2ig8teRQsUOekog55Mq9e\n\txRWiegO0SalcbvNOOpxflsGQfCgcKdFdE/zm3ycsTCrETLOgKgikfl61/aE6+qkaic\n\tyDvL3CkVAxaCMojXPiMaXjMIkeU0TrIYpoCexS0AazZOS7kQymIRJJZnG329LCSJcB\n\taX3vcsX2dXLPkm16B9OsH5vfRuXyZvo63g0pQMet/gY2KpzDWKpE6NQN/CgMkdu6DB\n\tMXsba2Y5VPelA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1660873186;\n\tbh=nrd68zF+lLjYZL6w29T2ANHlTDAfjV5CcKzsh4PAlW8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ZfU/F2GQ823CRVyVJ4rECGpU4sCjwuDrdqp9fr74KrUmatJbvq1Ooetl0a6NC+WGg\n\tM+kCRTAG1sI0b9dc+hJDT3KyPRhhgdwC/tvUQMFWStqIp6HH3P8CbgGTckMqDJ+GYh\n\tFqJJifXmcdVzjdmtcNfL5JwgEPJU+K9oKgulKL0I="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"ZfU/F2GQ\"; dkim-atps=neutral","Date":"Fri, 19 Aug 2022 04:39:43 +0300","To":"Martin Kletzander <nert.pinx@gmail.com>","Message-ID":"<Yv7p3zriypZmlEBb@pendragon.ideasonboard.com>","References":"<beec98c3ab67cb75851c1108f5c5eef29baa7f20.1660215299.git.nert.pinx@gmail.com>\n\t<bfd00345-4b57-1f59-aba9-997d530f7980@ideasonboard.com>\n\t<YvUT+b5jGor6Bwt6@pendragon.ideasonboard.com>\n\t<YvUj6sxd0KMAUqDD@wheatley>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<YvUj6sxd0KMAUqDD@wheatley>","Subject":"Re: [libcamera-devel] [PATCH] build: Fix python dependency","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@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]