Search notes:

scripts/sphinx-pre-install

scripts/sphinx-pre-install is a Perl script that autotmatically checks for Sphinx dependencies.
By default, it checks all the requirements for both html and PDF, including the requirements for images, math expressions and LaTeX build, and assumes that a virtual Python environment will be used.
The ones needed for HTML builds are assumed to be mandatory; the others to be optional.

Options

--no-virtualenv Use OS packaging for Sphinx instead of Python virtual environment.
--version-check If version is compatible, don't check for missing dependencies
--no-pdf Disable checks for PDF

Formulate commands to install required dependencies

If the script recognizes the distribution, it also helps to formulate the command to install the required dependencies:
$ ~/linux ./scripts/sphinx-pre-install
Detected OS: Debian GNU/Linux 11 (bullseye).
Warning: better to also install "dvipng".
Warning: better to also install "latexmk".
Warning: better to also install "rsvg-convert".
Warning: better to also install "texlive-lang-chinese".
Warning: better to also install "xelatex".
You should run:

        sudo apt-get install dvipng latexmk librsvg2-bin texlive-lang-chinese texlive-xetex

Sphinx needs to be installed either:
1) via pip/pypi with:

        /usr/bin/python3 -m venv sphinx_2.4.4
        . sphinx_2.4.4/bin/activate
        pip install -r ./Documentation/sphinx/requirements.txt

    If you want to exit the virtualenv, you can use:
        deactivate

2) As a package with:

        sudo apt-get install python3-sphinx
  …
After installing the suggested packages and software:
$ ~/linux ./scripts/sphinx-pre-install
Detected OS: Debian GNU/Linux 11 (bullseye).
Sphinx version: 3.4.3


All optional dependencies are met.
Needed package dependencies are met.

See also

Other scripts
Documentation/doc-guide/sphinx.rst

Index