[{"id":35499,"web_url":"https://patchwork.libcamera.org/comment/35499/","msgid":"<7070691f-38ce-49f8-ab8f-53f18f958fe8@ideasonboard.com>","date":"2025-08-19T08:01:18","subject":"Re: [PATCH 1/2] Documentation: Use python3 directly to check for\n\tdoxylink version","submitter":{"id":109,"url":"https://patchwork.libcamera.org/api/people/109/","name":"Tomi Valkeinen","email":"tomi.valkeinen@ideasonboard.com"},"content":"Hi,\n\nOn 18/08/2025 15:11, Laurent Pinchart wrote:\n> When checking the version of the sphinxcontrib.doxylink module, the\n> Python interpreter used by Sphinx must be used, as that's where the\n> module will be imported from. Using the meson python_installation object\n> for this purpose is incorrect, as it's meant to access the Python\n> installation of the host machine, not the native Python interpreter on\n> the host machine. Fix this by using python3 directly.\n\nCan you give an example here? I'm not sure I understand \"Python\ninstallation of the host machine\" vs \"Python interpreter on the host\nmachine\".\n\n Tomi\n\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  Documentation/meson.build | 5 +----\n>  1 file changed, 1 insertion(+), 4 deletions(-)\n> \n> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> index b898ba3a0b7e..163875014eec 100644\n> --- a/Documentation/meson.build\n> +++ b/Documentation/meson.build\n> @@ -124,12 +124,9 @@ if sphinx.found()\n>      # Many distributions do not provide a recent-enough version of the doxylink\n>      # module. This results in a build error with a cryptic message. Check the\n>      # version manually and print clear error messages.\n> -    py_mod = import('python')\n> -    py3 = py_mod.find_installation('python3')\n> -\n>      mod = 'sphinxcontrib.doxylink'\n>      min_version = '>=1.6.1'\n> -    version = run_command(py3, '-c',\n> +    version = run_command('python3', '-c',\n>                            'import @0@ ; print(@0@.__version__)'.format(mod),\n>                            check : false).stdout().strip()\n> \n> \n> base-commit: af43c2f945c42cc7d111de63abed9ca3df830ca4\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 9A8BABEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Aug 2025 08:01:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5DC2F69266;\n\tTue, 19 Aug 2025 10:01:23 +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 E145E6923C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Aug 2025 10:01:21 +0200 (CEST)","from [192.168.88.20] (91-158-153-178.elisa-laajakaista.fi\n\t[91.158.153.178])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EB6DAC6D;\n\tTue, 19 Aug 2025 10:00:23 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"stLe7pW2\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755590424;\n\tbh=9i9GnEym1x5sqczdOfXxuyns4iYNkTdcQ/B2SW3o0m8=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=stLe7pW2IPBPdiPNHaJR8OPa1/y0IsprwXsKGADaURLj3y0SG4CRTWidNjbizFTzF\n\tEvHnzw/HTKJ3tsUPOLyWZcDiGtlyvt5ZpeKaIqX+bSebtBVyrCk4RKvpWm9FHV1XxD\n\tL3vowLd2nQW88oUsWpbfEnRzjQFBVfB1ZTjnlzZM=","Message-ID":"<7070691f-38ce-49f8-ab8f-53f18f958fe8@ideasonboard.com>","Date":"Tue, 19 Aug 2025 11:01:18 +0300","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 1/2] Documentation: Use python3 directly to check for\n\tdoxylink version","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20250818121103.20073-1-laurent.pinchart@ideasonboard.com>","Content-Language":"en-US","From":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Autocrypt":"addr=tomi.valkeinen@ideasonboard.com; keydata=\n\t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","In-Reply-To":"<20250818121103.20073-1-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"7bit","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35500,"web_url":"https://patchwork.libcamera.org/comment/35500/","msgid":"<20250819083205.GN5862@pendragon.ideasonboard.com>","date":"2025-08-19T08:32:05","subject":"Re: [PATCH 1/2] Documentation: Use python3 directly to check for\n\tdoxylink version","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Tomi,\n\nOn Tue, Aug 19, 2025 at 11:01:18AM +0300, Tomi Valkeinen wrote:\n> On 18/08/2025 15:11, Laurent Pinchart wrote:\n> > When checking the version of the sphinxcontrib.doxylink module, the\n> > Python interpreter used by Sphinx must be used, as that's where the\n> > module will be imported from. Using the meson python_installation object\n> > for this purpose is incorrect, as it's meant to access the Python\n> > installation of the host machine, not the native Python interpreter on\n> > the host machine. Fix this by using python3 directly.\n> \n> Can you give an example here? I'm not sure I understand \"Python\n> installation of the host machine\" vs \"Python interpreter on the host\n> machine\".\n\nOops, the second \"host\" should be \"build\".\n\nI'll rewrite the commit message as\n\n----------\nWhen checking the version of the sphinxcontrib.doxylink module, the\nPython interpreter used by Sphinx must be used, as that's where the\nmodule will be imported from. Using the meson python_installation object\nfor this purpose is incorrect, as it's meant to access the Python\ninstallation of the host machine, not the system Python interpreter on\nthe build machine.\n\nFor instance, when cross-compiling libcamera against a Buildroot\nenvironment, and pointing meson in the cross-file to the build machine\nPython interpreter from Buildroot, the meson python module will refer to\nthe latter, while Sphinx will use the former.\n\nFix this by using python3 directly.\n----------\n\n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >  Documentation/meson.build | 5 +----\n> >  1 file changed, 1 insertion(+), 4 deletions(-)\n> > \n> > diff --git a/Documentation/meson.build b/Documentation/meson.build\n> > index b898ba3a0b7e..163875014eec 100644\n> > --- a/Documentation/meson.build\n> > +++ b/Documentation/meson.build\n> > @@ -124,12 +124,9 @@ if sphinx.found()\n> >      # Many distributions do not provide a recent-enough version of the doxylink\n> >      # module. This results in a build error with a cryptic message. Check the\n> >      # version manually and print clear error messages.\n> > -    py_mod = import('python')\n> > -    py3 = py_mod.find_installation('python3')\n> > -\n> >      mod = 'sphinxcontrib.doxylink'\n> >      min_version = '>=1.6.1'\n> > -    version = run_command(py3, '-c',\n> > +    version = run_command('python3', '-c',\n> >                            'import @0@ ; print(@0@.__version__)'.format(mod),\n> >                            check : false).stdout().strip()\n> > \n> > \n> > base-commit: af43c2f945c42cc7d111de63abed9ca3df830ca4","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 52E31BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Aug 2025 08:32:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0246C69266;\n\tTue, 19 Aug 2025 10:32:29 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 82F616923C\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Aug 2025 10:32:27 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 58A651A37; \n\tTue, 19 Aug 2025 10:31:29 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"a086HMfn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755592289;\n\tbh=QXWBjdcsBpjJLJPcq8Et0coLdNyJU764aSFjPKsBxXY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=a086HMfnKxl/MjUHtYD216V6/4xj+1jk1DVF2FCf8/m4aqEi5u0xDSi1GvxXtXDQ/\n\tt4uIT5fUFzTWalIbH/4ksit5sif73v6eZZ5zxupBzVK/VKyDyDgoXG32oMF2zJ6jP4\n\tvPMLjYPCoE4jopyM9IUGYgceWCVHBhb9NpnQjBcE=","Date":"Tue, 19 Aug 2025 11:32:05 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 1/2] Documentation: Use python3 directly to check for\n\tdoxylink version","Message-ID":"<20250819083205.GN5862@pendragon.ideasonboard.com>","References":"<20250818121103.20073-1-laurent.pinchart@ideasonboard.com>\n\t<7070691f-38ce-49f8-ab8f-53f18f958fe8@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<7070691f-38ce-49f8-ab8f-53f18f958fe8@ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35505,"web_url":"https://patchwork.libcamera.org/comment/35505/","msgid":"<da7c7489-540e-417a-82ca-250f33058a7c@ideasonboard.com>","date":"2025-08-19T10:01:22","subject":"Re: [PATCH 1/2] Documentation: Use python3 directly to check for\n\tdoxylink version","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 08. 18. 14:11 keltezéssel, Laurent Pinchart írta:\n> When checking the version of the sphinxcontrib.doxylink module, the\n> Python interpreter used by Sphinx must be used, as that's where the\n> module will be imported from. Using the meson python_installation object\n> for this purpose is incorrect, as it's meant to access the Python\n> installation of the host machine, not the native Python interpreter on\n> the host machine. Fix this by using python3 directly.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>   Documentation/meson.build | 5 +----\n>   1 file changed, 1 insertion(+), 4 deletions(-)\n> \n> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> index b898ba3a0b7e..163875014eec 100644\n> --- a/Documentation/meson.build\n> +++ b/Documentation/meson.build\n> @@ -124,12 +124,9 @@ if sphinx.found()\n>       # Many distributions do not provide a recent-enough version of the doxylink\n>       # module. This results in a build error with a cryptic message. Check the\n>       # version manually and print clear error messages.\n> -    py_mod = import('python')\n> -    py3 = py_mod.find_installation('python3')\n> -\n>       mod = 'sphinxcontrib.doxylink'\n>       min_version = '>=1.6.1'\n> -    version = run_command(py3, '-c',\n> +    version = run_command('python3', '-c',\n\nShould this not use `find_program(nature: true)`? (Or does it already implicitly?)\n\nI feel like that we should maybe use `find_program()` to find a python interpreter,\nand use that everywhere a native python executable is needed? And for example invoke\nsphinx as follows:\n\n   py3 = find_program(...)\n   [py3, '-m', 'sphinx', ...]\n\nOr am I missing something?\n\n\nRegards,\nBarnabás Pőcze\n\n>                             'import @0@ ; print(@0@.__version__)'.format(mod),\n>                             check : false).stdout().strip()\n> \n> \n> base-commit: af43c2f945c42cc7d111de63abed9ca3df830ca4\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 83D7BBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Aug 2025 10:01:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CAA91692CB;\n\tTue, 19 Aug 2025 12:01:27 +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 E3A346924B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Aug 2025 12:01:26 +0200 (CEST)","from [192.168.33.20] (185.221.141.188.nat.pool.zt.hu\n\t[185.221.141.188])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 03D081F0E;\n\tTue, 19 Aug 2025 12:00:28 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ex9+1CC5\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755597629;\n\tbh=xvVUOCRw8PTqpN44JDDe0DsjeS4ZxpaO4maqWpnRZx4=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=ex9+1CC5KuhTSwOVB4MaGMZAWVtRHZTeFziErQSDyNEjDxkHdWLYmEnagxhY++HWG\n\tqxQianyxSe4gt3/uPT2EfH+tmJI394nqP+/Idl41krORSr5887/WIS9YW2h9fOfWg8\n\t1C8w1aPTsCvFunDOhvPWBbiMQ/cIswDdrodaiZJw=","Message-ID":"<da7c7489-540e-417a-82ca-250f33058a7c@ideasonboard.com>","Date":"Tue, 19 Aug 2025 12:01:22 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 1/2] Documentation: Use python3 directly to check for\n\tdoxylink version","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20250818121103.20073-1-laurent.pinchart@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250818121103.20073-1-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35506,"web_url":"https://patchwork.libcamera.org/comment/35506/","msgid":"<20250819105758.GQ5862@pendragon.ideasonboard.com>","date":"2025-08-19T10:57:58","subject":"Re: [PATCH 1/2] Documentation: Use python3 directly to check for\n\tdoxylink version","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Aug 19, 2025 at 12:01:22PM +0200, Barnabás Pőcze wrote:\n> 2025. 08. 18. 14:11 keltezéssel, Laurent Pinchart írta:\n> > When checking the version of the sphinxcontrib.doxylink module, the\n> > Python interpreter used by Sphinx must be used, as that's where the\n> > module will be imported from. Using the meson python_installation object\n> > for this purpose is incorrect, as it's meant to access the Python\n> > installation of the host machine, not the native Python interpreter on\n> > the host machine. Fix this by using python3 directly.\n> > \n> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> > ---\n> >   Documentation/meson.build | 5 +----\n> >   1 file changed, 1 insertion(+), 4 deletions(-)\n> > \n> > diff --git a/Documentation/meson.build b/Documentation/meson.build\n> > index b898ba3a0b7e..163875014eec 100644\n> > --- a/Documentation/meson.build\n> > +++ b/Documentation/meson.build\n> > @@ -124,12 +124,9 @@ if sphinx.found()\n> >       # Many distributions do not provide a recent-enough version of the doxylink\n> >       # module. This results in a build error with a cryptic message. Check the\n> >       # version manually and print clear error messages.\n> > -    py_mod = import('python')\n> > -    py3 = py_mod.find_installation('python3')\n> > -\n> >       mod = 'sphinxcontrib.doxylink'\n> >       min_version = '>=1.6.1'\n> > -    version = run_command(py3, '-c',\n> > +    version = run_command('python3', '-c',\n> \n> Should this not use `find_program(nature: true)`? (Or does it already implicitly?)\n\nWhen run_command() receives a string, it wraps them in an\nExternalProgram() instance, which is also what find_program() gives.\nfind_program() gives more control and supports features such as wraps.\n\nWhen cross-compiling libcamera with a cross-file that specifies a Python\ninterpreter binary from buildroot, meson prints the following to its log\nfor the about run_command('python3', ...) call:\n\nRunning command: /usr/bin/python3 -c 'import sphinxcontrib.doxylink ; print(sphinxcontrib.doxylink.__version__)'\n\nIt seems we're fine.\n\n> I feel like that we should maybe use `find_program()` to find a python interpreter,\n> and use that everywhere a native python executable is needed? And for example invoke\n> sphinx as follows:\n> \n>    py3 = find_program(...)\n>    [py3, '-m', 'sphinx', ...]\n\nPossibly, but that may be a bit overkill. I'm tempted to leave it as-is\nfor now as nothing seems broken.\n\n> Or am I missing something?\n> \n> >                             'import @0@ ; print(@0@.__version__)'.format(mod),\n> >                             check : false).stdout().strip()\n> > \n> > \n> > base-commit: af43c2f945c42cc7d111de63abed9ca3df830ca4","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 65664BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Aug 2025 10:58:26 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EAE53692CF;\n\tTue, 19 Aug 2025 12:58:24 +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 37CBA69252\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Aug 2025 12:58:23 +0200 (CEST)","from pendragon.ideasonboard.com (85-76-43-215-nat.elisa-mobile.fi\n\t[85.76.43.215])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 604B32391; \n\tTue, 19 Aug 2025 12:57:24 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"hSb6H660\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755601045;\n\tbh=DkWWAPVm5CPZsO0oIIeao6c9pCKmoIwMBGgYbOuHmSk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=hSb6H660swd2s3vkdoJhSm7pLwu7HO4C4O/BggX5AiuiIqpDPztZIrIKwpTgQ2Mg9\n\t6xsoGf0ehfaTVdRzgdMZg3L+vNMZCc5PeGq9kKa1JnPjfgicPZpD5TyH93O5frNZUa\n\tbqoUWVYNhTWOmxdqWs7bUaWVQ/JcjC6Wyum2oeXw=","Date":"Tue, 19 Aug 2025 13:57:58 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 1/2] Documentation: Use python3 directly to check for\n\tdoxylink version","Message-ID":"<20250819105758.GQ5862@pendragon.ideasonboard.com>","References":"<20250818121103.20073-1-laurent.pinchart@ideasonboard.com>\n\t<da7c7489-540e-417a-82ca-250f33058a7c@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<da7c7489-540e-417a-82ca-250f33058a7c@ideasonboard.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35507,"web_url":"https://patchwork.libcamera.org/comment/35507/","msgid":"<56247164-4061-4a48-891a-7a4d1ab5b3ac@protonmail.com>","date":"2025-08-19T11:39:08","subject":"Re: [PATCH 1/2] Documentation: Use python3 directly to check for\n\tdoxylink version","submitter":{"id":133,"url":"https://patchwork.libcamera.org/api/people/133/","name":"Pőcze Barnabás","email":"pobrn@protonmail.com"},"content":"2025. 08. 19. 12:57 keltezéssel, Laurent Pinchart írta:\n> On Tue, Aug 19, 2025 at 12:01:22PM +0200, Barnabás Pőcze wrote:\n>> 2025. 08. 18. 14:11 keltezéssel, Laurent Pinchart írta:\n>>> When checking the version of the sphinxcontrib.doxylink module, the\n>>> Python interpreter used by Sphinx must be used, as that's where the\n>>> module will be imported from. Using the meson python_installation object\n>>> for this purpose is incorrect, as it's meant to access the Python\n>>> installation of the host machine, not the native Python interpreter on\n>>> the host machine. Fix this by using python3 directly.\n>>>\n>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>>> ---\n>>>    Documentation/meson.build | 5 +----\n>>>    1 file changed, 1 insertion(+), 4 deletions(-)\n>>>\n>>> diff --git a/Documentation/meson.build b/Documentation/meson.build\n>>> index b898ba3a0b7e..163875014eec 100644\n>>> --- a/Documentation/meson.build\n>>> +++ b/Documentation/meson.build\n>>> @@ -124,12 +124,9 @@ if sphinx.found()\n>>>        # Many distributions do not provide a recent-enough version of the doxylink\n>>>        # module. This results in a build error with a cryptic message. Check the\n>>>        # version manually and print clear error messages.\n>>> -    py_mod = import('python')\n>>> -    py3 = py_mod.find_installation('python3')\n>>> -\n>>>        mod = 'sphinxcontrib.doxylink'\n>>>        min_version = '>=1.6.1'\n>>> -    version = run_command(py3, '-c',\n>>> +    version = run_command('python3', '-c',\n>>\n>> Should this not use `find_program(nature: true)`? (Or does it already implicitly?)\n> \n> When run_command() receives a string, it wraps them in an\n> ExternalProgram() instance, which is also what find_program() gives.\n> find_program() gives more control and supports features such as wraps.\n> \n> When cross-compiling libcamera with a cross-file that specifies a Python\n> interpreter binary from buildroot, meson prints the following to its log\n> for the about run_command('python3', ...) call:\n> \n> Running command: /usr/bin/python3 -c 'import sphinxcontrib.doxylink ; print(sphinxcontrib.doxylink.__version__)'\n> \n> It seems we're fine.\n\nAs far as I am aware program overrides in cross/native files won't take effect\nin this case (not using `find_program()`), no? Although I suppose overriding python\nmight be incompatible with other parts using the python module?\n\n\n> \n>> I feel like that we should maybe use `find_program()` to find a python interpreter,\n>> and use that everywhere a native python executable is needed? And for example invoke\n>> sphinx as follows:\n>>\n>>     py3 = find_program(...)\n>>     [py3, '-m', 'sphinx', ...]\n> \n> Possibly, but that may be a bit overkill. I'm tempted to leave it as-is\n> for now as nothing seems broken.\n> \n>> Or am I missing something?\n>>\n>>>                              'import @0@ ; print(@0@.__version__)'.format(mod),\n>>>                              check : false).stdout().strip()\n>>>\n>>>\n>>> base-commit: af43c2f945c42cc7d111de63abed9ca3df830ca4\n> \n> --\n> Regards,\n> \n> Laurent Pinchart","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 37958BEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Aug 2025 11:39:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F261C692CF;\n\tTue, 19 Aug 2025 13:39:15 +0200 (CEST)","from mail-10630.protonmail.ch (mail-10630.protonmail.ch\n\t[79.135.106.30])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1BC1469252\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Aug 2025 13:39:14 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=protonmail.com header.i=@protonmail.com\n\theader.b=\"qxcHgxHA\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;\n\ts=protonmail3; t=1755603553; x=1755862753;\n\tbh=iw7/7n3mxo/H5WotoHiyLjrrdTrRb9MYNcS8ETtAMm4=;\n\th=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:\n\tFeedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:\n\tMessage-ID:BIMI-Selector;\n\tb=qxcHgxHAAlOwdyVtX6ovjdpNVN40hKHzDiWfA2dAbklLS0+nuY6E+QyUVf2DzY7Qp\n\tUIzZTh7E+uZbZiqWjKkXG86qmoGz/dhriSsE5mEfj/7zK57k/RyeWo+KKfH6vw/o4J\n\tJnrKUAANtH3xZgxvShGvcloNyX4CUZuro8Or5OP/hAJUeEd+bF+9eyFvUlexY7Y52m\n\tmOv5b3Yqx/s6Byp4hxMNayEjebSe39t0JabJ3reUZSAuWUhmXLG4Jzl63uDotmVbnX\n\t6oH+MrEnjbkPIx0ZOgkkazC/7Ik884c30cgK0ylvJFociG5xBeM6ozZ8ZrFy26nEFY\n\t/oEs0W3Low9bQ==","Date":"Tue, 19 Aug 2025 11:39:08 +0000","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>, =?utf-8?q?Barnab?=\n\t=?utf-8?b?w6FzIFDFkWN6ZQ==?= <barnabas.pocze@ideasonboard.com>","From":"=?utf-8?q?P=C5=91cze_Barnab=C3=A1s?= <pobrn@protonmail.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 1/2] Documentation: Use python3 directly to check for\n\tdoxylink version","Message-ID":"<56247164-4061-4a48-891a-7a4d1ab5b3ac@protonmail.com>","In-Reply-To":"<20250819105758.GQ5862@pendragon.ideasonboard.com>","References":"<20250818121103.20073-1-laurent.pinchart@ideasonboard.com>\n\t<da7c7489-540e-417a-82ca-250f33058a7c@ideasonboard.com>\n\t<20250819105758.GQ5862@pendragon.ideasonboard.com>","Feedback-ID":"20568564:user:proton","X-Pm-Message-ID":"57454846fa4849b3432ba365377bf75ec70113a0","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35508,"web_url":"https://patchwork.libcamera.org/comment/35508/","msgid":"<ffd760df-14fe-4592-b62f-89344e26c501@ideasonboard.com>","date":"2025-08-19T11:43:24","subject":"Re: [PATCH 1/2] Documentation: Use python3 directly to check for\n\tdoxylink version","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2025. 08. 19. 12:57 keltezéssel, Laurent Pinchart írta:\n> On Tue, Aug 19, 2025 at 12:01:22PM +0200, Barnabás Pőcze wrote:\n>> 2025. 08. 18. 14:11 keltezéssel, Laurent Pinchart írta:\n>>> When checking the version of the sphinxcontrib.doxylink module, the\n>>> Python interpreter used by Sphinx must be used, as that's where the\n>>> module will be imported from. Using the meson python_installation object\n>>> for this purpose is incorrect, as it's meant to access the Python\n>>> installation of the host machine, not the native Python interpreter on\n>>> the host machine. Fix this by using python3 directly.\n>>>\n>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>>> ---\n>>>    Documentation/meson.build | 5 +----\n>>>    1 file changed, 1 insertion(+), 4 deletions(-)\n>>>\n>>> diff --git a/Documentation/meson.build b/Documentation/meson.build\n>>> index b898ba3a0b7e..163875014eec 100644\n>>> --- a/Documentation/meson.build\n>>> +++ b/Documentation/meson.build\n>>> @@ -124,12 +124,9 @@ if sphinx.found()\n>>>        # Many distributions do not provide a recent-enough version of the doxylink\n>>>        # module. This results in a build error with a cryptic message. Check the\n>>>        # version manually and print clear error messages.\n>>> -    py_mod = import('python')\n>>> -    py3 = py_mod.find_installation('python3')\n>>> -\n>>>        mod = 'sphinxcontrib.doxylink'\n>>>        min_version = '>=1.6.1'\n>>> -    version = run_command(py3, '-c',\n>>> +    version = run_command('python3', '-c',\n>>\n>> Should this not use `find_program(nature: true)`? (Or does it already implicitly?)\n> \n> When run_command() receives a string, it wraps them in an\n> ExternalProgram() instance, which is also what find_program() gives.\n> find_program() gives more control and supports features such as wraps.\n> \n> When cross-compiling libcamera with a cross-file that specifies a Python\n> interpreter binary from buildroot, meson prints the following to its log\n> for the about run_command('python3', ...) call:\n> \n> Running command: /usr/bin/python3 -c 'import sphinxcontrib.doxylink ; print(sphinxcontrib.doxylink.__version__)'\n> \n\nAs far as I am aware program overrides in cross/native files won't take effect\nin this case (not using `find_program()`), no? Although I suppose overriding python\nmight be incompatible with other parts using the python module?\n\n\n> It seems we're fine.\n> \n>> I feel like that we should maybe use `find_program()` to find a python interpreter,\n>> and use that everywhere a native python executable is needed? And for example invoke\n>> sphinx as follows:\n>>\n>>     py3 = find_program(...)\n>>     [py3, '-m', 'sphinx', ...]\n> \n> Possibly, but that may be a bit overkill. I'm tempted to leave it as-is\n> for now as nothing seems broken.\n> \n>> Or am I missing something?\n>>\n>>>                              'import @0@ ; print(@0@.__version__)'.format(mod),\n>>>                              check : false).stdout().strip()\n>>>\n>>>\n>>> base-commit: af43c2f945c42cc7d111de63abed9ca3df830ca4\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 B24E8BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Aug 2025 11:43:31 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 671BA692D7;\n\tTue, 19 Aug 2025 13:43:30 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BC736692CB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Aug 2025 13:43:27 +0200 (CEST)","from [192.168.33.20] (185.221.141.188.nat.pool.zt.hu\n\t[185.221.141.188])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A78F41A37;\n\tTue, 19 Aug 2025 13:42:29 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"RVtTHH8n\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755603749;\n\tbh=YYvbirGwMryuieZb9qmN4cohpA7bE/zrilUSinG5D5Y=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=RVtTHH8nrvgSTdhrxOo8MxZyUyzw0emV8uj68vqeOkDuNOR3Y+VIi9XypJrTKAhbN\n\tSRbQLsW5jUDOOctSJGM25cjkxvtxkr6ochOSXrK52ADq5ncY5YOkn8djR/Ae3EWzZ9\n\tXmpaXE3x/wN37jwvlJ7xMuCONIb5w2YeeITKa5KM=","Message-ID":"<ffd760df-14fe-4592-b62f-89344e26c501@ideasonboard.com>","Date":"Tue, 19 Aug 2025 13:43:24 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 1/2] Documentation: Use python3 directly to check for\n\tdoxylink version","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","References":"<20250818121103.20073-1-laurent.pinchart@ideasonboard.com>\n\t<da7c7489-540e-417a-82ca-250f33058a7c@ideasonboard.com>\n\t<20250819105758.GQ5862@pendragon.ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250819105758.GQ5862@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35510,"web_url":"https://patchwork.libcamera.org/comment/35510/","msgid":"<20250819122113.GS5862@pendragon.ideasonboard.com>","date":"2025-08-19T12:21:13","subject":"Re: [PATCH 1/2] Documentation: Use python3 directly to check for\n\tdoxylink version","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Aug 19, 2025 at 11:39:08AM +0000, Barnabás Pőcze wrote:\n> 2025. 08. 19. 12:57 keltezéssel, Laurent Pinchart írta:\n> > On Tue, Aug 19, 2025 at 12:01:22PM +0200, Barnabás Pőcze wrote:\n> >> 2025. 08. 18. 14:11 keltezéssel, Laurent Pinchart írta:\n> >>> When checking the version of the sphinxcontrib.doxylink module, the\n> >>> Python interpreter used by Sphinx must be used, as that's where the\n> >>> module will be imported from. Using the meson python_installation object\n> >>> for this purpose is incorrect, as it's meant to access the Python\n> >>> installation of the host machine, not the native Python interpreter on\n> >>> the host machine. Fix this by using python3 directly.\n> >>>\n> >>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> >>> ---\n> >>>    Documentation/meson.build | 5 +----\n> >>>    1 file changed, 1 insertion(+), 4 deletions(-)\n> >>>\n> >>> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> >>> index b898ba3a0b7e..163875014eec 100644\n> >>> --- a/Documentation/meson.build\n> >>> +++ b/Documentation/meson.build\n> >>> @@ -124,12 +124,9 @@ if sphinx.found()\n> >>>        # Many distributions do not provide a recent-enough version of the doxylink\n> >>>        # module. This results in a build error with a cryptic message. Check the\n> >>>        # version manually and print clear error messages.\n> >>> -    py_mod = import('python')\n> >>> -    py3 = py_mod.find_installation('python3')\n> >>> -\n> >>>        mod = 'sphinxcontrib.doxylink'\n> >>>        min_version = '>=1.6.1'\n> >>> -    version = run_command(py3, '-c',\n> >>> +    version = run_command('python3', '-c',\n> >>\n> >> Should this not use `find_program(nature: true)`? (Or does it already implicitly?)\n> > \n> > When run_command() receives a string, it wraps them in an\n> > ExternalProgram() instance, which is also what find_program() gives.\n> > find_program() gives more control and supports features such as wraps.\n> > \n> > When cross-compiling libcamera with a cross-file that specifies a Python\n> > interpreter binary from buildroot, meson prints the following to its log\n> > for the about run_command('python3', ...) call:\n> > \n> > Running command: /usr/bin/python3 -c 'import sphinxcontrib.doxylink ; print(sphinxcontrib.doxylink.__version__)'\n> > \n> > It seems we're fine.\n> \n> As far as I am aware program overrides in cross/native files won't take effect\n> in this case (not using `find_program()`), no?\n\nOops indeed, you're right.\n\nI've tried\n\n    host_py3 = find_program('python3')\n    version = run_command(host_py3, '-c',\n                          'import @0@ ; print(@0@.__version__)'.format(mod),\n                          check : false).stdout().strip()\n\nand meson still picks /usr/bin/python3. However, with\n\n    host_py3 = find_program('python')\n    version = run_command(host_py3, '-c',\n                          'import @0@ ; print(@0@.__version__)'.format(mod),\n                          check : false).stdout().strip()\n\nmeson picks the interpreter from the cross file. With\n\n    version = run_command('python', '-c',\n                          'import @0@ ; print(@0@.__version__)'.format(mod),\n                          check : false).stdout().strip()\n\nmeson picks /usr/bin/python3.\n\n> Although I suppose overriding python\n> might be incompatible with other parts using the python module?\n\nI think it's another big rabbit hole :-) In theory it would be nice, in\npractice I'm not sure anyone would care.\n\n> >> I feel like that we should maybe use `find_program()` to find a python interpreter,\n> >> and use that everywhere a native python executable is needed? And for example invoke\n> >> sphinx as follows:\n> >>\n> >>     py3 = find_program(...)\n> >>     [py3, '-m', 'sphinx', ...]\n> > \n> > Possibly, but that may be a bit overkill. I'm tempted to leave it as-is\n> > for now as nothing seems broken.\n> > \n> >> Or am I missing something?\n> >>\n> >>>                              'import @0@ ; print(@0@.__version__)'.format(mod),\n> >>>                              check : false).stdout().strip()\n> >>>\n> >>>\n> >>> base-commit: af43c2f945c42cc7d111de63abed9ca3df830ca4","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 56B42BDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 19 Aug 2025 12:21:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6136C692CF;\n\tTue, 19 Aug 2025 14:21:38 +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 888D769252\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 19 Aug 2025 14:21:36 +0200 (CEST)","from pendragon.ideasonboard.com (85-76-43-215-nat.elisa-mobile.fi\n\t[85.76.43.215])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 56F682391; \n\tTue, 19 Aug 2025 14:20:38 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Oj6ZxAxj\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755606038;\n\tbh=JITzOktc4yw8Y47VWAhSk+4MypFzFmH8la22ss92gcs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Oj6ZxAxj04mHgm6F3lE/z6YReOySYSamZG3lPDy9lXDwJzjaH+x6bl1NcMk5P6zsD\n\tiUtn0qhGgftgm2YWNsqhFLvezNICKBWFJ/IRK55qpfVg1ggmyBOz4bM4207fKv8ZcU\n\toyuswJ//OD9SbgT6hlIDFmSgnjZVGbp/VZdSuJuE=","Date":"Tue, 19 Aug 2025 15:21:13 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"=?utf-8?q?P=C5=91cze_Barnab=C3=A1s?= <pobrn@protonmail.com>","Cc":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH 1/2] Documentation: Use python3 directly to check for\n\tdoxylink version","Message-ID":"<20250819122113.GS5862@pendragon.ideasonboard.com>","References":"<20250818121103.20073-1-laurent.pinchart@ideasonboard.com>\n\t<da7c7489-540e-417a-82ca-250f33058a7c@ideasonboard.com>\n\t<20250819105758.GQ5862@pendragon.ideasonboard.com>\n\t<56247164-4061-4a48-891a-7a4d1ab5b3ac@protonmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<56247164-4061-4a48-891a-7a4d1ab5b3ac@protonmail.com>","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]