Skip to content

Commit 84b4cc8

Browse files
tobluxJonathan Corbet
authored andcommitted
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
1 parent dc8769a commit 84b4cc8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

scripts/sphinx-pre-install

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ sub give_debian_hints()
361361
{
362362
my %map = (
363363
"python-sphinx" => "python3-sphinx",
364+
"yaml" => "python3-yaml",
364365
"ensurepip" => "python3-venv",
365366
"virtualenv" => "virtualenv",
366367
"dot" => "graphviz",
@@ -395,6 +396,7 @@ sub give_redhat_hints()
395396
{
396397
my %map = (
397398
"python-sphinx" => "python3-sphinx",
399+
"yaml" => "python3-pyyaml",
398400
"virtualenv" => "python3-virtualenv",
399401
"dot" => "graphviz",
400402
"convert" => "ImageMagick",
@@ -477,6 +479,7 @@ sub give_opensuse_hints()
477479
{
478480
my %map = (
479481
"python-sphinx" => "python3-sphinx",
482+
"yaml" => "python3-pyyaml",
480483
"virtualenv" => "python3-virtualenv",
481484
"dot" => "graphviz",
482485
"convert" => "ImageMagick",
@@ -956,6 +959,7 @@ sub check_needs()
956959

957960
# Check for needed programs/tools
958961
check_perl_module("Pod::Usage", 0);
962+
check_python_module("yaml", 0);
959963
check_program("make", 0);
960964
check_program("gcc", 0);
961965
check_program("dot", 1);

0 commit comments

Comments
 (0)