From: Vegard Nossum <vegard.nossum@oracle.com>
To: Thorsten Blum <thorsten.blum@toblux.com>
Cc: corbet@lwn.net, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, mchehab@kernel.org
Subject: Re: [PATCH v2] docs: scripts: sphinx-pre-install: Fix building docs with pyyaml package
Date: Thu, 8 Feb 2024 17:37:53 +0100 [thread overview]
Message-ID: <4c297f67-72e1-44d7-acb0-462ac261640d@oracle.com> (raw)
In-Reply-To: <20240208131305.52577-1-thorsten.blum@toblux.com>
On 08/02/2024 14:13, Thorsten Blum wrote:
> The Python module pyyaml is required to build the docs, but it is only
> listed in Documentation/sphinx/requirements.txt and is therefore missing
> when Sphinx is installed as a package and not via pip/pypi.
>
> Add pyyaml as an optional package for Debian- and Red Hat-based distros to
s/optional/required/ ? Given...
> fix building the docs if you prefer to install Sphinx as a package.
>
> Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
> ---
> Changes in v2:
> - s/pyyaml/yaml/ as suggested by Vegard Nossum <vegard.nossum@oracle.com>
> - Make the check require the Python module; was optional
...this ^
> ---
> scripts/sphinx-pre-install | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
> index 25aefbb35377..7e49a020c25e 100755
> --- a/scripts/sphinx-pre-install
> +++ b/scripts/sphinx-pre-install
> @@ -361,6 +361,7 @@ sub give_debian_hints()
> {
> my %map = (
> "python-sphinx" => "python3-sphinx",
> + "yaml" => "python3-yaml",
> "ensurepip" => "python3-venv",
> "virtualenv" => "virtualenv",
> "dot" => "graphviz",
> @@ -395,6 +396,7 @@ sub give_redhat_hints()
> {
> my %map = (
> "python-sphinx" => "python3-sphinx",
> + "yaml" => "python3-pyyaml",
> "virtualenv" => "python3-virtualenv",
> "dot" => "graphviz",
> "convert" => "ImageMagick",
> @@ -951,6 +953,7 @@ sub check_needs()
>
> # Check for needed programs/tools
> check_perl_module("Pod::Usage", 0);
> + check_python_module("yaml", 0);
> check_program("make", 0);
> check_program("gcc", 0);
> check_program("dot", 1);
This seems to work.
Reviewed-by: Vegard Nossum <vegard.nossum@oracle.com>
Tested-by: Vegard Nossum <vegard.nossum@oracle.com>
Can/should we add it to give_opensuse_hints() as well, given that it
also apparently allows you to install Sphinx via the distro package
manager? (Not sure about mageia/arch/gentoo.)
Vegard
next prev parent reply other threads:[~2024-02-08 16:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-07 11:12 [PATCH] " Thorsten Blum
2024-02-08 10:21 ` Vegard Nossum
2024-02-08 13:13 ` [PATCH v2] " Thorsten Blum
2024-02-08 16:37 ` Vegard Nossum [this message]
2024-02-08 20:15 ` Thorsten Blum
2024-02-08 20:55 ` [PATCH v3] " Thorsten Blum
2024-02-14 22:32 ` Jonathan Corbet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4c297f67-72e1-44d7-acb0-462ac261640d@oracle.com \
--to=vegard.nossum@oracle.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=thorsten.blum@toblux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®