[{"id":33918,"web_url":"https://patchwork.libcamera.org/comment/33918/","msgid":"<20250404172117.GK4845@pendragon.ideasonboard.com>","date":"2025-04-04T17:21:17","subject":"Re: [PATCH 2/2] meson: do not automatically build documentation if\n\tsphinx-build-3 is found","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Quentin,\n\nThank you for the patch.\n\nOn Fri, Apr 04, 2025 at 06:12:35PM +0200, Quentin Schulz wrote:\n> From: Quentin Schulz <quentin.schulz@cherry.de>\n> \n> Commit aba567338b25 (\"Documentation: Move all dependencies into\n> features\") did an incomplete migration of the documentation boolean\n> option into a documentation feature.\n> \n> If sphinx-build-3 binary is found on the host system, the documentation\n> is built, regardless of the value of the feature option.\n> \n> This makes sure that sphinx-build-3 presence is only checked if the\n> documentation feature is not disabled (which is the default, as it's\n> \"auto\" by default).\n> \n> This is essential for reproducibility for build systems where\n> sphinx-build-3 may or may not be present when libcamera is built, and\n> also to declutter the generated package if documentation isn't desired.\n> \n> Fixes: aba567338b25 (\"Documentation: Move all dependencies into features\")\n> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  Documentation/meson.build | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> index 6158320e..c59849f6 100644\n> --- a/Documentation/meson.build\n> +++ b/Documentation/meson.build\n> @@ -116,7 +116,7 @@ endif\n>  # Sphinx\n>  #\n>  \n> -sphinx = find_program('sphinx-build-3', required : false)\n> +sphinx = find_program('sphinx-build-3', required : get_option('documentation'))\n>  if not sphinx.found()\n>      sphinx = find_program('sphinx-build', required : get_option('documentation'))\n>  endif","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 9B8E9C327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  4 Apr 2025 17:21:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EAE8F689A1;\n\tFri,  4 Apr 2025 19:21:43 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9ABB068991\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  4 Apr 2025 19:21:42 +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 ESMTPSA id CA747129;\n\tFri,  4 Apr 2025 19:19:47 +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=\"VBeNslAk\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1743787188;\n\tbh=p8GKNu4jynBChXYVoU7gStWxmwWlibAsfXfVIGwpAmw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=VBeNslAkIH+QzLNvLihT3uw/wLP3Sz2z0qx3NH9unUxMw33ZP4YxCCKZoBBC1/LHy\n\tghDYtjjBfekUYlPeIb34Wvj7ZCo1/inlWJptPwW+ozOB+MjrL7FcPpQZiaPSokefjo\n\tctW3kNUpITi40HoYgBPj3rk+u92aC4bXHUFq8AFw=","Date":"Fri, 4 Apr 2025 20:21:17 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Quentin Schulz <foss+libcamera@0leil.net>","Cc":"libcamera-devel@lists.libcamera.org,\n\tQuentin Schulz <quentin.schulz@cherry.de>","Subject":"Re: [PATCH 2/2] meson: do not automatically build documentation if\n\tsphinx-build-3 is found","Message-ID":"<20250404172117.GK4845@pendragon.ideasonboard.com>","References":"<20250404161237.1298653-1-foss+libcamera@0leil.net>\n\t<20250404161237.1298653-2-foss+libcamera@0leil.net>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250404161237.1298653-2-foss+libcamera@0leil.net>","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":33920,"web_url":"https://patchwork.libcamera.org/comment/33920/","msgid":"<ff1f873b-af8a-48e6-b34c-47315e0f3110@ideasonboard.com>","date":"2025-04-04T17:50:06","subject":"Re: [PATCH 2/2] meson: do not automatically build documentation if\n\tsphinx-build-3 is found","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n\n2025. 04. 04. 18:12 keltezéssel, Quentin Schulz írta:\n> From: Quentin Schulz <quentin.schulz@cherry.de>\n> \n> Commit aba567338b25 (\"Documentation: Move all dependencies into\n> features\") did an incomplete migration of the documentation boolean\n> option into a documentation feature.\n> \n> If sphinx-build-3 binary is found on the host system, the documentation\n> is built, regardless of the value of the feature option.\n> \n> This makes sure that sphinx-build-3 presence is only checked if the\n> documentation feature is not disabled (which is the default, as it's\n> \"auto\" by default).\n> \n> This is essential for reproducibility for build systems where\n> sphinx-build-3 may or may not be present when libcamera is built, and\n> also to declutter the generated package if documentation isn't desired.\n> \n> Fixes: aba567338b25 (\"Documentation: Move all dependencies into features\")\n> Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>\n> ---\n>   Documentation/meson.build | 2 +-\n>   1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> index 6158320e..c59849f6 100644\n> --- a/Documentation/meson.build\n> +++ b/Documentation/meson.build\n> @@ -116,7 +116,7 @@ endif\n>   # Sphinx\n>   #\n>   \n> -sphinx = find_program('sphinx-build-3', required : false)\n> +sphinx = find_program('sphinx-build-3', required : get_option('documentation'))\n\nI think this is not entirely ideal. If `documentation=enabled`, `sphinx-build-3`\nis not found, but `sphinx-build` is, then the above call will abort with an error,\nand meson will never check for `sphinx-build`.\n\nI think\n\n   sphinx = find_program(['sphinx-build-3', 'sphinx-build'], required : get_option('documentation')\n\nmight work.\n\n\n>   if not sphinx.found()\n>       sphinx = find_program('sphinx-build', required : get_option('documentation'))\n>   endif\n\n\nRegards,\nBarnabás Pőcze","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 C8B46C327D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  4 Apr 2025 17:50:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 244416899E;\n\tFri,  4 Apr 2025 19:50:12 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7D43068991\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  4 Apr 2025 19:50:10 +0200 (CEST)","from [192.168.33.21] (185.182.215.138.nat.pool.zt.hu\n\t[185.182.215.138])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DEF14316\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  4 Apr 2025 19:48:15 +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=\"YLKS8zEJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1743788896;\n\tbh=/xKqZJISkxueH7i+ozi2rjyOBiM9V9S47vhanihisUo=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=YLKS8zEJ0+0X9NbA7Hc/K+F4LKvKRx+2hIi4IiqBad+5aIiBrRN2lyK1rd45GlJti\n\thdn8xGbkyDo9i4BjE+Dw5oFGxFxkz5xMEVMTuytD0idvMvH5MhG57iopfy8l3OHh3+\n\tC47rmU7852JhFMLWG7C6Zc4BRPGJgAQHbBAhrWlY=","Message-ID":"<ff1f873b-af8a-48e6-b34c-47315e0f3110@ideasonboard.com>","Date":"Fri, 4 Apr 2025 19:50:06 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 2/2] meson: do not automatically build documentation if\n\tsphinx-build-3 is found","To":"libcamera-devel@lists.libcamera.org","References":"<20250404161237.1298653-1-foss+libcamera@0leil.net>\n\t<20250404161237.1298653-2-foss+libcamera@0leil.net>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250404161237.1298653-2-foss+libcamera@0leil.net>","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":33921,"web_url":"https://patchwork.libcamera.org/comment/33921/","msgid":"<20250404181013.GM4845@pendragon.ideasonboard.com>","date":"2025-04-04T18:10:13","subject":"Re: [PATCH 2/2] meson: do not automatically build documentation if\n\tsphinx-build-3 is found","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Apr 04, 2025 at 07:50:06PM +0200, Barnabás Pőcze wrote:\n> 2025. 04. 04. 18:12 keltezéssel, Quentin Schulz írta:\n> > From: Quentin Schulz <quentin.schulz@cherry.de>\n> > \n> > Commit aba567338b25 (\"Documentation: Move all dependencies into\n> > features\") did an incomplete migration of the documentation boolean\n> > option into a documentation feature.\n> > \n> > If sphinx-build-3 binary is found on the host system, the documentation\n> > is built, regardless of the value of the feature option.\n> > \n> > This makes sure that sphinx-build-3 presence is only checked if the\n> > documentation feature is not disabled (which is the default, as it's\n> > \"auto\" by default).\n> > \n> > This is essential for reproducibility for build systems where\n> > sphinx-build-3 may or may not be present when libcamera is built, and\n> > also to declutter the generated package if documentation isn't desired.\n> > \n> > Fixes: aba567338b25 (\"Documentation: Move all dependencies into features\")\n> > Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>\n> > ---\n> >   Documentation/meson.build | 2 +-\n> >   1 file changed, 1 insertion(+), 1 deletion(-)\n> > \n> > diff --git a/Documentation/meson.build b/Documentation/meson.build\n> > index 6158320e..c59849f6 100644\n> > --- a/Documentation/meson.build\n> > +++ b/Documentation/meson.build\n> > @@ -116,7 +116,7 @@ endif\n> >   # Sphinx\n> >   #\n> >   \n> > -sphinx = find_program('sphinx-build-3', required : false)\n> > +sphinx = find_program('sphinx-build-3', required : get_option('documentation'))\n> \n> I think this is not entirely ideal. If `documentation=enabled`, `sphinx-build-3`\n> is not found, but `sphinx-build` is, then the above call will abort with an error,\n> and meson will never check for `sphinx-build`.\n\nGood point.\n\n> I think\n> \n>    sphinx = find_program(['sphinx-build-3', 'sphinx-build'], required : get_option('documentation')\n> \n> might work.\n\nOr\n\n    sphinx = find_program('sphinx-build-3', 'sphinx-build', required : get_option('documentation')\n\nQuentin, could you check if that fixes your issue ?\n\n> >   if not sphinx.found()\n> >       sphinx = find_program('sphinx-build', required : get_option('documentation'))\n> >   endif","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 EF238C3213\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  4 Apr 2025 18:10:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0DD2D689A1;\n\tFri,  4 Apr 2025 20:10:41 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4A0D068991\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  4 Apr 2025 20:10:39 +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 ESMTPSA id 72A4049E;\n\tFri,  4 Apr 2025 20:08:44 +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=\"nZ2JiCJm\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1743790124;\n\tbh=T6K0ayy2P6u6Z8wzcj7nITcvvKImdMsYNZC2S/5+jEk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=nZ2JiCJmtVFbKzL4BgrJSzcoYXRGXQHwtkb6l8ZG8y3EjSKtzx5bY+7nqYR1B/xe1\n\tm5FWmc38RFCXTkDG/w1ckksCKvcWyN8cVi08FubC4umlBPhq2XfwOmZa+KGuZopgF1\n\t+9FJJYpoh+/ZD31zPodUGTZccqBXu5FDWjb4RBnU=","Date":"Fri, 4 Apr 2025 21:10:13 +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 2/2] meson: do not automatically build documentation if\n\tsphinx-build-3 is found","Message-ID":"<20250404181013.GM4845@pendragon.ideasonboard.com>","References":"<20250404161237.1298653-1-foss+libcamera@0leil.net>\n\t<20250404161237.1298653-2-foss+libcamera@0leil.net>\n\t<ff1f873b-af8a-48e6-b34c-47315e0f3110@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<ff1f873b-af8a-48e6-b34c-47315e0f3110@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>"}}]