docs: drop the version constraints for sphinx and dependencies
authorLukas Bulwahn <lukas.bulwahn@gmail.com>
Fri, 1 Mar 2024 14:18:00 +0000 (15:18 +0100)
committerJonathan Corbet <corbet@lwn.net>
Sun, 3 Mar 2024 15:17:20 +0000 (08:17 -0700)
commitb31274d58d2156cf884551426ec51315b7cc1ac9
treebca7e511a239daf658ea091d3798f575419464d1
parent0df46e099156d894ee5b412a8bd986e13b2568c8
docs: drop the version constraints for sphinx and dependencies

As discussed (see Links), there is some inertia to move to the recent
Sphinx versions for the doc build environment.

As first step, drop the version constraints and the related comments. As
sphinx depends on jinja2, jinja2 is pulled in automatically. So drop that.
Then, the sphinx-pre-install script will fail though with:

  Can't get default sphinx version from ./Documentation/sphinx/requirements.txt at ./scripts/sphinx-pre-install line 305.

The script simply expects to parse a version constraint with Sphinx in the
requirements.txt. That version is used in the script for suggesting the
virtualenv directory name.

To suggest a virtualenv directory name, when there is no version given in
the requirements.txt, one could try to guess the version that would be
downloaded with 'pip install -r Documentation/sphinx/requirements.txt'.
However, there seems no simple way to get that version without actually
setting up the venv and running pip. So, instead, name the directory with
the fixed name 'sphinx_latest'.

Finally update the Sphinx build documentation to reflect this directory
name change.

Link: https://lore.kernel.org/linux-doc/874jf4m384.fsf@meer.lwn.net/
Link: https://lore.kernel.org/linux-doc/20240226093854.47830-1-lukas.bulwahn@gmail.com/
Reviewed-by: Akira Yokosawa <akiyks@gmail.com>
Tested-by: Vegard Nossum <vegard.nossum@oracle.com>
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <20240301141800.30218-1-lukas.bulwahn@gmail.com>
Documentation/doc-guide/sphinx.rst
Documentation/sphinx/requirements.txt
scripts/sphinx-pre-install