aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@toblux.com>2024-02-08 21:55:51 +0100
committerJonathan Corbet <corbet@lwn.net>2024-02-14 15:32:03 -0700
commit84b4cc8189f222ff3e32ea9d09afb7ae4a4a4205 (patch)
tree23cecf8adef75161ff6be4a423b93751eeace5e1 /scripts
parentdc8769a8826b49f0db04566dd001fda929d5de0a (diff)
downloadlinux-84b4cc8189f222ff3e32ea9d09afb7ae4a4a4205.tar.gz
docs: scripts: sphinx-pre-install: Fix building docs with pyyaml package
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 multiple distros to fix building the docs if you prefer to install Sphinx as a package. Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Reviewed-by: Vegard Nossum <vegard.nossum@oracle.com> Tested-by: Vegard Nossum <vegard.nossum@oracle.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/20240208205550.984-1-thorsten.blum@toblux.com
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/sphinx-pre-install4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index 948f284bfc8b5f..de0de5dd676ea3 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",
@@ -477,6 +479,7 @@ sub give_opensuse_hints()
{
my %map = (
"python-sphinx" => "python3-sphinx",
+ "yaml" => "python3-pyyaml",
"virtualenv" => "python3-virtualenv",
"dot" => "graphviz",
"convert" => "ImageMagick",
@@ -956,6 +959,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);