From nobody Sun Apr 19 10:41:15 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04FEEC433EF for ; Sat, 2 Jul 2022 10:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232306AbiGBKLp (ORCPT ); Sat, 2 Jul 2022 06:11:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231958AbiGBKLh (ORCPT ); Sat, 2 Jul 2022 06:11:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CD9918B2F; Sat, 2 Jul 2022 03:11:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 13E4260C1D; Sat, 2 Jul 2022 10:11:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4C72C385A2; Sat, 2 Jul 2022 10:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656756694; bh=TMtnHo/8GUFYMa8hq1V2c5cTtfe8PC0ceSv5rkb1fL0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oVl7NF0u+LWzCek7eSm3OFN09fXrCKtslN7rkSs8aaR7Hai50hJ+AloTnOKLvA4lt A0N9jjngFWhIFgYYgICYxy/Wt9fjWdjTJvdLWz95CMczkNA0Nh62OPzrQ8I8qRCIJs jhhVRD/AA0ns1/SpgMddO8GQ5yi3LbsNnzNWFB4lWdCYOJO56ItRcX0TReNG8M5/Tq hkf+/VxGuoE8NJAiAF1eedrptNmjOsvZdcajh20WvWYtqhUCiuOcArogWNP4LLyZfk KWHp50DLNcg6SHIZmEetxPWHagvPdP+deISwcb6+WDLxEWUNvWy4wgRbSagJgx0N3J ZykEwgboeZ8Dw== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1o7a67-007cMd-Lz; Sat, 02 Jul 2022 11:11:31 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , "Mauro Carvalho Chehab" , ksummit-discuss@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/5] scripts: sphinx-pre-install: fix venv version check logic Date: Sat, 2 Jul 2022 11:11:25 +0100 Message-Id: X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The logic which checks if the venv version is good enough but was not activated is broken: it is checking against the wrong val, making it to recommend to re-create a venv every time. Fix it. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C= /C on the cover. See [PATCH v2 0/5] at: https://lore.kernel.org/all/cover.1656756450.git.mch= ehab@kernel.org/ scripts/sphinx-pre-install | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install index f126ecbb0494..ae8c49734899 100755 --- a/scripts/sphinx-pre-install +++ b/scripts/sphinx-pre-install @@ -741,7 +741,7 @@ sub recommend_sphinx_upgrade() =20 # Get the highest version from sphinx_*/bin/sphinx-build and the # corresponding command to activate the venv/virtenv - $activate_cmd =3D get_virtenv(); + ($activate_cmd, $venv_ver) =3D get_virtenv(); =20 # Store the highest version from Sphinx existing virtualenvs if (($activate_cmd ne "") && ($venv_ver gt $cur_version)) { @@ -759,10 +759,14 @@ sub recommend_sphinx_upgrade() # Either there are already a virtual env or a new one should be created $need_pip =3D 1; =20 + return if (!$latest_avail_ver); + # Return if the reason is due to an upgrade or not if ($latest_avail_ver lt $rec_version) { $rec_sphinx_upgrade =3D 1; } + + return $latest_avail_ver; } =20 # @@ -820,7 +824,7 @@ sub recommend_sphinx_version($) } =20 # Suggest newer versions if current ones are too old - if ($latest_avail_ver && $cur_version ge $min_version) { + if ($latest_avail_ver && $latest_avail_ver ge $min_version) { # If there's a good enough version, ask the user to enable it if ($latest_avail_ver ge $rec_version) { printf "\nNeed to activate Sphinx (version $latest_avail_ver) on virtua= lenv with:\n"; @@ -897,7 +901,7 @@ sub check_needs() } } =20 - recommend_sphinx_upgrade(); + my $venv_ver =3D recommend_sphinx_upgrade(); =20 my $virtualenv_cmd; =20 --=20 2.36.1 From nobody Sun Apr 19 10:41:15 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4E817C433EF for ; Sat, 2 Jul 2022 10:11:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232294AbiGBKLm (ORCPT ); Sat, 2 Jul 2022 06:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231897AbiGBKLh (ORCPT ); Sat, 2 Jul 2022 06:11:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D88718B2A; Sat, 2 Jul 2022 03:11:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7B65060C14; Sat, 2 Jul 2022 10:11:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF254C341CD; Sat, 2 Jul 2022 10:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656756694; bh=tyjiB6KXIb2t/OE4/soCi8nyF//+2DvXcvBFmclJruU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tqHiiJ6Jne5DcQX2ahkE0KDPkGEHznmWfh365Q4dkbNYGNCo/gpwQiU3beWEo+rx3 abIMoF1s7y/kn5tRTBc6BCklWV5LKwnfgs3arjHnR1GBBsamccMkd+N+7tAsSVWCTu Bd2LSLLrZiJzuIJE22MVmfTx4pETQ2Hb8Weyv39tDiIz+0GygFrkDkvosFJ+Bj414P t1s4ds/YzCFgFXdo7BAZK/iX+YvgBSw+5+oheRt4bAP1XUFMypX2E/VL999NCMvkoM sgCju8OdJofs+8px3zJ8neSf9J0tukSooajV8UqvIi8sRZpA9g/faZHWfyAi/VPek4 InQwEYqiIdmpA== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1o7a67-007cMg-MX; Sat, 02 Jul 2022 11:11:31 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , "Mauro Carvalho Chehab" , ksummit-discuss@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 2/5] scripts: sphinx-pre-install: report broken venv Date: Sat, 2 Jul 2022 11:11:26 +0100 Message-Id: X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" After distro upgrades, the directory names for python may change. On such case, the previously-created venv will be broken, and sphinx-build won't run. Add a logic to report it. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C= /C on the cover. See [PATCH v2 0/5] at: https://lore.kernel.org/all/cover.1656756450.git.mch= ehab@kernel.org/ scripts/sphinx-pre-install | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install index ae8c49734899..18537e5af692 100755 --- a/scripts/sphinx-pre-install +++ b/scripts/sphinx-pre-install @@ -720,6 +720,12 @@ sub get_virtenv() next if (! -f $sphinx_cmd); =20 my $ver =3D get_sphinx_version($sphinx_cmd); + + if (!$ver) { + $f =3D~ s#/bin/activate##; + print("Warning: virtual envionment $f is not working.\nPython version u= pgrade? Remove it with:\n\n\trm -rf $f\n\n"); + } + if ($need_sphinx && ($ver ge $min_version)) { return ($f, $ver); } elsif ($ver gt $cur_version) { --=20 2.36.1 From nobody Sun Apr 19 10:41:15 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95AFEC433EF for ; Sat, 2 Jul 2022 10:11:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230096AbiGBKLs (ORCPT ); Sat, 2 Jul 2022 06:11:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232222AbiGBKLi (ORCPT ); Sat, 2 Jul 2022 06:11:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 636DE186C1; Sat, 2 Jul 2022 03:11:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0E905B80B74; Sat, 2 Jul 2022 10:11:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA03DC341CA; Sat, 2 Jul 2022 10:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656756694; bh=4fxaIwjih4ajTW4WLPyem4PV3PKwddCqz91QnrLu8SI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TX4JyE5M7c1wuWFOZd/BEwy2IJ5ge1tG8q268GdQTbZ2KLHQ/2C/9msMQNmvHzZI9 kj6VP47UPjYBjV0VNXlP/tJxjbnXESdEbAHEDGNlM8EW8CUbjoWdyOqAr9W50T8Fy2 Ze+PVJl73Inrzu448uDcqPsyR0jqD91BufK7xUg/S0/KM+VYr/OMsy8OTDsZdmRnMl xGYQrfYGMiBIOd4uWd5Mh64lWax5cRg0HNLv7Qg5+gvc9Ll3daBdBUxIB+/MFjup4z GdFYYKsCQ9xbWsRzCkZ0TlydU2T+gZps14xTQ1tb9gJVC/kr2HpDqTCgjG+Dpyih5Q GCWoAxtd32iYw== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1o7a67-007cMj-N3; Sat, 02 Jul 2022 11:11:31 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , "Mauro Carvalho Chehab" , ksummit-discuss@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/5] scripts: sphinx-pre-install: check for PDF min version later on Date: Sat, 2 Jul 2022 11:11:27 +0100 Message-Id: <8e117aabe6dfa1b1ec92dccd20e801393c977667.1656756450.git.mchehab@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Better to add the PDF note late for venv recommendation. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C= /C on the cover. See [PATCH v2 0/5] at: https://lore.kernel.org/all/cover.1656756450.git.mch= ehab@kernel.org/ scripts/sphinx-pre-install | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install index 18537e5af692..930a6d058c12 100755 --- a/scripts/sphinx-pre-install +++ b/scripts/sphinx-pre-install @@ -785,12 +785,13 @@ sub recommend_sphinx_version($) { my $virtualenv_cmd =3D shift; =20 - if ($latest_avail_ver lt $min_pdf_version) { - print "note: If you want pdf, you need at least Sphinx $min_pdf_version.= \n"; - } - # Version is OK. Nothing to do. - return if ($cur_version && ($cur_version ge $rec_version)); + if ($cur_version && ($cur_version ge $rec_version)) { + if ($cur_version lt $min_pdf_version) { + print "note: If you want pdf, you need at least Sphinx $min_pdf_version= .\n"; + } + return; + }; =20 if (!$need_sphinx) { # sphinx-build is present and its version is >=3D $min_version @@ -837,6 +838,10 @@ sub recommend_sphinx_version($) printf "\t. $activate_cmd\n"; deactivate_help(); =20 + if ($latest_avail_ver lt $min_pdf_version) { + print "note: If you want pdf, you need at least Sphinx $min_pdf_versio= n.\n"; + } + return; } =20 --=20 2.36.1 From nobody Sun Apr 19 10:41:15 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14BF8CCA480 for ; Sat, 2 Jul 2022 10:11:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232180AbiGBKLj (ORCPT ); Sat, 2 Jul 2022 06:11:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbiGBKLh (ORCPT ); Sat, 2 Jul 2022 06:11:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 056D5186C1; Sat, 2 Jul 2022 03:11:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7A24A60C09; Sat, 2 Jul 2022 10:11:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C21CCC341CE; Sat, 2 Jul 2022 10:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656756694; bh=wMdXq2y82GLiB6F6ppucYweW5DGaedV5+P83VXCnYMc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VwEvOgZZIv/S7hq91E0RU8y2CGQDZq1wliv9825COknHo1AR+bpXqQWp6ZcmYC/Nr iTlriAk7SUEX2p32Xm00lXafO5HdrhRz5UQ3fkzoiliSDc4bttlnaXJyVk7FH+kYt5 rsDh+59Ir5KGBSQModfpKvE9UujjwteJRUNOnHOSK9Cm48EU21ggnPBHYvEyceY3Ce 8vq6V3ufFtyxxoBCb60ztBijNNYcrUZ/lqMMGqNXyWGL2+feskQEKZXJKu3L25BX4i 8RCtPzxs7SOwWqqzGiQlcR5PYPuLWGtN/YPHUDuXeNcoyzkBYoO0LrtE08zQUoOYvn 3RzRS39skKmDg== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1o7a67-007cMm-Nb; Sat, 02 Jul 2022 11:11:31 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , "Mauro Carvalho Chehab" , ksummit-discuss@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/5] scripts: sphinx-pre-install: provide both venv and package installs Date: Sat, 2 Jul 2022 11:11:28 +0100 Message-Id: <7c99d985df204c73e3daafd5fd2f30a31269405d.1656756450.git.mchehab@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" As it is not a consensus about installing sphinx using venv, and modern distributions are now shipping with Sphinx versions above the minimal requirements to build the docs, provide both venv and package install commands by default. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C= /C on the cover. See [PATCH v2 0/5] at: https://lore.kernel.org/all/cover.1656756450.git.mch= ehab@kernel.org/ scripts/sphinx-pre-install | 55 +++++++++++++++++++++++++++++--------- 1 file changed, 42 insertions(+), 13 deletions(-) diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install index 930a6d058c12..106d75425d3f 100755 --- a/scripts/sphinx-pre-install +++ b/scripts/sphinx-pre-install @@ -25,6 +25,7 @@ my $need_sphinx =3D 0; my $need_pip =3D 0; my $need_virtualenv =3D 0; my $rec_sphinx_upgrade =3D 0; +my $verbose_warn_install =3D 1; my $install =3D ""; my $virtenv_dir =3D ""; my $python_cmd =3D ""; @@ -103,10 +104,12 @@ sub check_missing(%) next; } =20 - if ($is_optional) { - print "Warning: better to also install \"$prog\".\n"; - } else { - print "ERROR: please install \"$prog\", otherwise, build won't work.\n"; + if ($verbose_warn_install) { + if ($is_optional) { + print "Warning: better to also install \"$prog\".\n"; + } else { + print "ERROR: please install \"$prog\", otherwise, build won't work.\n= "; + } } if (defined($map{$prog})) { $install .=3D " " . $map{$prog}; @@ -386,7 +389,8 @@ sub give_debian_hints() check_missing(\%map); =20 return if (!$need && !$optional); - printf("You should run:\n\n\tsudo apt-get install $install\n"); + printf("You should run:\n") if ($verbose_warn_install); + printf("\n\tsudo apt-get install $install\n"); } =20 sub give_redhat_hints() @@ -458,10 +462,12 @@ sub give_redhat_hints() =20 if (!$old) { # dnf, for Fedora 18+ - printf("You should run:\n\n\tsudo dnf install -y $install\n"); + printf("You should run:\n") if ($verbose_warn_install); + printf("\n\tsudo dnf install -y $install\n"); } else { # yum, for RHEL (and clones) or Fedora version < 18 - printf("You should run:\n\n\tsudo yum install -y $install\n"); + printf("You should run:\n") if ($verbose_warn_install); + printf("\n\tsudo yum install -y $install\n"); } } =20 @@ -509,7 +515,8 @@ sub give_opensuse_hints() check_missing(\%map); =20 return if (!$need && !$optional); - printf("You should run:\n\n\tsudo zypper install --no-recommends $install= \n"); + printf("You should run:\n") if ($verbose_warn_install); + printf("\n\tsudo zypper install --no-recommends $install\n"); } =20 sub give_mageia_hints() @@ -553,7 +560,8 @@ sub give_mageia_hints() check_missing(\%map); =20 return if (!$need && !$optional); - printf("You should run:\n\n\tsudo $packager_cmd $install\n"); + printf("You should run:\n") if ($verbose_warn_install); + printf("\n\tsudo $packager_cmd $install\n"); } =20 sub give_arch_linux_hints() @@ -583,7 +591,8 @@ sub give_arch_linux_hints() check_missing(\%map); =20 return if (!$need && !$optional); - printf("You should run:\n\n\tsudo pacman -S $install\n"); + printf("You should run:\n") if ($verbose_warn_install); + printf("\n\tsudo pacman -S $install\n"); } =20 sub give_gentoo_hints() @@ -610,7 +619,8 @@ sub give_gentoo_hints() =20 return if (!$need && !$optional); =20 - printf("You should run:\n\n"); + printf("You should run:\n") if ($verbose_warn_install); + printf("\n"); =20 my $imagemagick =3D "media-gfx/imagemagick svg png"; my $cairo =3D "media-gfx/graphviz cairo pdf"; @@ -700,7 +710,7 @@ sub check_distros() =20 sub deactivate_help() { - printf "\nIf you want to exit the virtualenv, you can use:\n"; + printf "\n If you want to exit the virtualenv, you can use:\n"; printf "\tdeactivate\n"; } =20 @@ -863,7 +873,7 @@ sub recommend_sphinx_version($) print "To upgrade Sphinx, use:\n\n"; } } else { - print "Sphinx needs to be installed either as a package or via pip/pypi = with:\n"; + print "\nSphinx needs to be installed either:\n1) via pip/pypi with:\n\n= "; } =20 $python_cmd =3D find_python_no_venv(); @@ -873,6 +883,25 @@ sub recommend_sphinx_version($) printf "\t. $virtenv_dir/bin/activate\n"; printf "\tpip install -r $requirement_file\n"; deactivate_help(); + + printf "\n2) As a package with:\n"; + + my $old_need =3D $need; + my $old_optional =3D $optional; + %missing =3D (); + $pdf =3D 0; + $optional =3D 0; + $install =3D ""; + $verbose_warn_install =3D 0; + + add_package("python-sphinx", 0); + check_python_module("sphinx_rtd_theme", 1); + + check_distros(); + + $need =3D $old_need; + $optional =3D $old_optional; + } =20 sub check_needs() --=20 2.36.1 From nobody Sun Apr 19 10:41:15 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29A11C43334 for ; Sat, 2 Jul 2022 10:11:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230406AbiGBKLy (ORCPT ); Sat, 2 Jul 2022 06:11:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232242AbiGBKLi (ORCPT ); Sat, 2 Jul 2022 06:11:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C571218B0D; Sat, 2 Jul 2022 03:11:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2EC85B82ED3; Sat, 2 Jul 2022 10:11:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7355C34114; Sat, 2 Jul 2022 10:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656756694; bh=zSYkGS2HJ+WHpni5N2jtrIv0c5dT9e/UFu6JXtlIEM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hxLYJRdzwkScLW67dCya8z32Ptg9ZRATYeWcVIHmYMyFXf1EW9Ba/sv/9t0T5fmnW EL1obzl/d6Vgojfm/W8079lfCmkQGY3pf/yRFfIvYFbYOD5dBZ6hU7yE7xvlGsbpKV r/39j8VsPiQNvCa0v6A8+Cz0dtFZr7vgs/+wx/i9VmMupmPTeUVh55PqSKOplXp0hW 5Ufb57aqwShAFaTAvZkh7TXTXxAP5DN9SDGEKcEy8BR2GQwJwqj37q/j0a9khN0Xof lmHjNGiO29w6jwcPYChT4XHQzUrXvWezhOpdav3+sSi6S57Vmaq9XXEd8rDGn9SUNY NGmDsWKiDjZqw== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1o7a67-007cMp-OA; Sat, 02 Jul 2022 11:11:31 +0100 From: Mauro Carvalho Chehab To: Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Jonathan Corbet" , "Mauro Carvalho Chehab" , ksummit-discuss@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 5/5] scripts: sphinx-pre-install: place a warning for Sphinx >= 3.0 Date: Sat, 2 Jul 2022 11:11:29 +0100 Message-Id: <085e0ada65c11da9303d07e70c510dc45f21315b.1656756450.git.mchehab@kernel.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Newer versions of Sphinx have a known bug: https://github.com/sphinx-doc/sphinx/pull/8313 Those currently produces 11 false-positive warnings On Sphinx version 3.1+. While Sphinx fix is not applied, let's warn adventurers that would be using Sphinx installed via distro packages. Signed-off-by: Mauro Carvalho Chehab --- To avoid mailbombing on a large number of people, only mailing lists were C= /C on the cover. See [PATCH v2 0/5] at: https://lore.kernel.org/all/cover.1656756450.git.mch= ehab@kernel.org/ scripts/sphinx-pre-install | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install index 106d75425d3f..271c4eb1d702 100755 --- a/scripts/sphinx-pre-install +++ b/scripts/sphinx-pre-install @@ -902,6 +902,10 @@ sub recommend_sphinx_version($) $need =3D $old_need; $optional =3D $old_optional; =20 + printf "\n Please note that Sphinx >=3D 3.0 will currently produce fal= se-positive\n"; + printf " warning when the same name is used for more than one type (fun= ctions,\n"; + printf " structs, enums,...). This is known Sphinx bug. For more detail= s, see:\n"; + printf "\thttps://github.com/sphinx-doc/sphinx/pull/8313\n"; } =20 sub check_needs() --=20 2.36.1