From nobody Thu Apr 30 09:28:41 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 3001BC433EF for ; Fri, 1 Jul 2022 08:49:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235940AbiGAItg (ORCPT ); Fri, 1 Jul 2022 04:49:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235142AbiGAItM (ORCPT ); Fri, 1 Jul 2022 04:49:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B3D710554; Fri, 1 Jul 2022 01:48:57 -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 811A4B82F30; Fri, 1 Jul 2022 08:48:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24761C385A2; Fri, 1 Jul 2022 08:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656665335; bh=5NEFfbQ4uRZ4CMrxr5oCuU2LU8Mhd/b8q8KWgb2amyM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Fx+39/nngvd8cGJxG3gEJ11+UOdFwDgn52p5DBdlRGjGeBRir/ZBOt6mDLTKt07L3 xVFtkOrdxUWuqQgon4infY1einUkrkH3blGVGqDaPisX34XJ8u5G/hKHuap2C9dkcv zXCvnD49dtgaYzF7sAYGAOR3FulWOIt5FcOjnoNDLxK/eEhwEvf5L+xeBkcKKDJigb 0D/tyT1eRUotyQPMv14++y9NU7KCEywu3R30Vprhw3UED27+QeRQvm31VvauCejcdp 09yOOv/C/WbD5JvZQvPtAjIEy57Y+auX6stjiT67tKfJioDO1e17i76QRucUQE+oOn pxlTdgg4AaTFg== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1o7CKZ-006T9B-Qm; Fri, 01 Jul 2022 09:48:51 +0100 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , ksummit-discuss@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] scripts: sphinx-pre-install: fix venv version check logic Date: Fri, 1 Jul 2022 09:48:46 +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" Cc: "Jonathan Corbet" Cc: "Mauro Carvalho Chehab" Cc: Jonathan Corbet Cc: Mauro Carvalho Chehab Cc: ksummit-discuss@lists.linuxfoundation.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org 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 0/4] at: https://lore.kernel.org/all/cover.1656664906.git.mcheha= b@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 Thu Apr 30 09:28:41 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 29038C43334 for ; Fri, 1 Jul 2022 08:49:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236461AbiGAItl (ORCPT ); Fri, 1 Jul 2022 04:49:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233288AbiGAItM (ORCPT ); Fri, 1 Jul 2022 04:49:12 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B103101ED; Fri, 1 Jul 2022 01:48:57 -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 69D4DB82F2F; Fri, 1 Jul 2022 08:48:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 14C3BC3411E; Fri, 1 Jul 2022 08:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656665335; bh=h5ZruEJ95WKJ2GkkQoahYktyKw9EOQdVkp6S/Q58M/I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YjUvQ6ldjSecl9YK6o+96aDdSYZlAySFkpsb/m9xVhslmuoV3a8QB4r22WhgvZ7aA bj318/1wCaFEsl2ahHyJioDNDMC+LxKCLV186jos4gUb8lRZXr+5U6nSzunuiUqh14 b6atIYfcy2M8poLGDiFWWvpZcpAYbr0VFt+gipmVIgvE+0OL83Nr31Su3xFOvKlBy7 QygFWDFtT5K72RPjm8G0rrTJ5g/aAQwSa7uxBVT+BtjlWD3IL3GAq6kwIq14pVYwgP JE4SLDobYts7WwdC0cunxRm515oelOt9Uu26/ryT2IBnUaP7MhEpx2nMhDAzPn8tcq tJBAjnTBe5HQg== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1o7CKZ-006T9E-RI; Fri, 01 Jul 2022 09:48:51 +0100 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , ksummit-discuss@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] scripts: sphinx-pre-install: report broken venv Date: Fri, 1 Jul 2022 09:48:47 +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" Cc: "Jonathan Corbet" Cc: "Mauro Carvalho Chehab" Cc: Jonathan Corbet Cc: Mauro Carvalho Chehab Cc: ksummit-discuss@lists.linuxfoundation.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org 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 0/4] at: https://lore.kernel.org/all/cover.1656664906.git.mcheha= b@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 Thu Apr 30 09:28:41 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 04F46C43334 for ; Fri, 1 Jul 2022 08:49:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236366AbiGAItZ (ORCPT ); Fri, 1 Jul 2022 04:49:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232946AbiGAItL (ORCPT ); Fri, 1 Jul 2022 04:49:11 -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 332567393E; Fri, 1 Jul 2022 01:48:56 -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 C0FD36223B; Fri, 1 Jul 2022 08:48:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E63BC341CB; Fri, 1 Jul 2022 08:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656665335; bh=pVzRk2aOjBqChxhGbyCkErNxF6Xl2nyq8gDIuD1VAr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DFxRs9rOQ9H4j3Skeg9fNug+kN8gVWr/U7RHSaZDz6vh1bSPdcpQw6WmxQOjDNcgm LIBQsp/E+IjQHCybJZzXvQbaY5FHMK2bWiSoVLOHp9YbG27Q27n5OqQhIDIkF8UXEH NUfJCn1WU4sj7dyPSFcfA21+uetXFu4xl+9xHwL7IAPIxkXCjdCU/6T/pkiR8piOBl BSJFxw41l/Irj3taBZYQW2ISaaTAjqlfyzCXfD7dapDJAwa9ca4Uw9Pfc+wXr2i2MZ PHuCcppiGeS3zeopc/jjJJ3YIeYqCl7lmwpzv7mHlqf/INmosSWHLvW9lO0DszrN05 1SDLTFvFGRI5w== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1o7CKZ-006T9H-Rw; Fri, 01 Jul 2022 09:48:51 +0100 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , ksummit-discuss@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] scripts: sphinx-pre-install: check for PDF min version later on Date: Fri, 1 Jul 2022 09:48:48 +0100 Message-Id: <3f8199555a432aededab38b1df7750ebba07d35c.1656664906.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" Cc: "Jonathan Corbet" Cc: "Mauro Carvalho Chehab" Cc: Jonathan Corbet Cc: Mauro Carvalho Chehab Cc: ksummit-discuss@lists.linuxfoundation.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org 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 0/4] at: https://lore.kernel.org/all/cover.1656664906.git.mcheha= b@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 Thu Apr 30 09:28:41 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 364A2C433EF for ; Fri, 1 Jul 2022 08:49:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233879AbiGAItd (ORCPT ); Fri, 1 Jul 2022 04:49:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233646AbiGAItM (ORCPT ); Fri, 1 Jul 2022 04:49:12 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7D21E0DA; Fri, 1 Jul 2022 01:48:56 -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 BAE02621F9; Fri, 1 Jul 2022 08:48:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C1ADC341C6; Fri, 1 Jul 2022 08:48:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656665335; bh=q6GO+RA/vkKq8tjuoPuRJhM1OnZmuwwmIL2YmITsc+c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u5jMWUu4ZGh+zipLD92yG6S3biqgvWqIVE8J37n7tlhAC/EqzUFEtLUwfhFQqVf8k +gRwEzMudWiJ2vGVuHmtRTAXztevdl8R3ov28IvLQU2Hq/R5+Xo2HhiNLDokirmaSA liaypvRlpeTxTfTwske3Aexemhnx1RtJNfpwJWK5+C4T9LhkcGW5tyeXwhuD4khalf mGT2IqAf1/wT76KqRRpl6YBD6F4moSxMW90jxv3uqgqjdU+ZgW+yGuc0YiR8C3tvHF /2f6J8S/R4aaIRE1/ck71DMpiIJlVd5PNqjF30lrgl8MdbIt5mRQzc7+Z2KrbBt6Up WXaBVdOOqNs4A== Received: from mchehab by mail.kernel.org with local (Exim 4.95) (envelope-from ) id 1o7CKZ-006T9K-SY; Fri, 01 Jul 2022 09:48:51 +0100 From: Mauro Carvalho Chehab To: Jonathan Corbet , Linux Doc Mailing List Cc: Mauro Carvalho Chehab , "Mauro Carvalho Chehab" , ksummit-discuss@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] scripts: sphinx-pre-install: provide both venv and package installs Date: Fri, 1 Jul 2022 09:48:49 +0100 Message-Id: <22f35e31173b368b40252df5ff9f3ef42a87c409.1656664906.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" Cc: "Jonathan Corbet" Cc: "Mauro Carvalho Chehab" Cc: Jonathan Corbet Cc: Mauro Carvalho Chehab Cc: ksummit-discuss@lists.linuxfoundation.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org 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 0/4] at: https://lore.kernel.org/all/cover.1656664906.git.mcheha= b@kernel.org/ scripts/sphinx-pre-install | 43 ++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install index 930a6d058c12..27bac4fbe35b 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"; @@ -873,6 +883,16 @@ sub recommend_sphinx_version($) printf "\t. $virtenv_dir/bin/activate\n"; printf "\tpip install -r $requirement_file\n"; deactivate_help(); + + printf "\nAnother option would be to install Sphinx package with:\n"; + + %missing =3D (); + $pdf =3D 0; + $optional =3D 0; + add_package("python-sphinx", 0); + check_python_module("sphinx_rtd_theme", 1); + + check_distros(); } =20 sub check_needs() @@ -945,6 +965,7 @@ sub check_needs() check_program("latexmk", 2) if ($pdf); =20 # Do distro-specific checks and output distro-install commands + $verbose_warn_install =3D 0; check_distros(); =20 if (!$python_cmd) { --=20 2.36.1