[{"id":27633,"web_url":"https://patchwork.libcamera.org/comment/27633/","msgid":"<169057917889.631430.14071191297554606203@Monstersaurus>","date":"2023-07-28T21:19:38","subject":"Re: [libcamera-devel] [PATCH] Documentation: theme: Fix compilation\n\twith Sphinx >= 7.0.0","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart via libcamera-devel (2023-07-28 20:39:57)\n> Sphinx 7.0.0 has dropped support for the deprecated 'style' variable\n> (https://github.com/sphinx-doc/sphinx/pull/11381). This breaks\n> compilation of the documentation:\n> \n>   /usr/bin/sphinx-build -D release=v0.1.0+16-eed6a079 -q -W -b html Documentation Documentation/html\n> \n>   Theme error:\n>   An error happened in rendering the page api-html/index.\n>   Reason: UndefinedError(\"'style' is undefined\")\n> \n> The recommended replacement is 'styles[-1]'. However, this resolves to\n> '_static/css/theme.css', which is part of the 'css_styles' variable, and\n> results in the stylesheet being included twice. To avoid that and fix\n> the compilation error, simply drop the first reference.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n> I've tested this change with Sphinx 7.0.1. If anyone can test with\n> earlier versions of Sphinx, that would be appreciated. Please verify in\n> the index.html that _static/css/theme.css is correctly referenced.\n\nOutput looks sane to me.\n\n\nTested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  Documentation/theme/layout.html | 5 -----\n>  1 file changed, 5 deletions(-)\n> \n> diff --git a/Documentation/theme/layout.html b/Documentation/theme/layout.html\n> index fcc6d221870c..4fffefab62eb 100644\n> --- a/Documentation/theme/layout.html\n> +++ b/Documentation/theme/layout.html\n> @@ -33,11 +33,6 @@ SPDX-License-Identifier: CC-BY-SA-4.0\n>  \n>    {% endif %}\n>  \n> -  {# RTD hosts this file, so just load on non RTD builds #}\n> -  {% if not READTHEDOCS %}\n> -    <link rel=\"stylesheet\" href=\"{{ pathto('_static/' + style, 1) }}\" type=\"text/css\" />\n> -  {% endif %}\n> -\n>    {% for cssfile in css_files %}\n>      <link rel=\"stylesheet\" href=\"{{ pathto(cssfile, 1) }}\" type=\"text/css\" />\n>    {% endfor %}\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 5F640BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Jul 2023 21:19:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ADDC5627EB;\n\tFri, 28 Jul 2023 23:19:43 +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 30D58627E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Jul 2023 23:19:42 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 79293A06;\n\tFri, 28 Jul 2023 23:18:41 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1690579183;\n\tbh=zhADkjL2Upw6HYX823KVF4bWq9DRqH17vu/fctOqzHo=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=YMAwt8JXkjni68tT2CKR9b16uG+lJgzO/FrPrbpve+pd4onH04YmBSKJg52hgg4WS\n\tC0UJpRoLEDRVY/GI3meg+sVMzCMYBfIvKOudGM0PQZrZpkRwZm/TE0/sgf1ZhVX0W0\n\tTt0O/Qc0aCXp6bjGlxWZIL6zO9UMsXhEuQTC/UV1zwWwybwypcp0aDyovcgwRRHBoI\n\tfa06kPa2G6dA9cbcWKuqP4kyC20lVWEPcNMfMAjjzh54RYIHzAAEM7XFK/SahGvc/P\n\t4aVfAgbBLsi2f+XkcZoHNwDU/Xi52N7dEH/ROQB6rYNcQFZcohql2OahhuMTuJdUO7\n\tf8xAJt5ivQpVA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1690579121;\n\tbh=zhADkjL2Upw6HYX823KVF4bWq9DRqH17vu/fctOqzHo=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=IJ71M77GEOlhVcUtN1nRV/ziJU4nWA1cv63bpsCrh2BuuBDW6/8VRdH9vGanCpO4f\n\tsbTlbdZOvi9oMvvFUYGZKAdSmRIc1HrtLJ25PATq0AqSYfUSI36IM6/x/CXeNzt/WB\n\tJv8g7AE05yL4rJUQ+tppIXc77LFWU9B0JPKi6ylE="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"IJ71M77G\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20230728193957.19723-1-laurent.pinchart@ideasonboard.com>","References":"<20230728193957.19723-1-laurent.pinchart@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 28 Jul 2023 22:19:38 +0100","Message-ID":"<169057917889.631430.14071191297554606203@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] Documentation: theme: Fix compilation\n\twith Sphinx >= 7.0.0","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":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]