[LTP] [PATCH v5 2/3] doc: Add sphinx to requirements.txt
Petr Vorel
pvorel@suse.cz
Mon Apr 7 17:01:31 CEST 2025
Although that slightly prolongs creating virtualenv (and CI job), but
it's probably better to handle it as the other requirements.
Use the same sphinx and sphinx-rtd-theme versions as on readthedocs.org.
That way we get doc generation tested by CI and by local build (to avoid
incompatibility changes).
Also don't install python3-sphinx via apt in CI job to keep usage the
same as in readthedocs.org.
Suggested-by: Andrea Cervesato <andrea.cervesato@suse.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Changes from v4:
* Use sphinx version used on readthedocs.org (to really test in devel
and github CI what will be deployed).
* Don't install sphinx in github CI (python3-sphinx package)
.github/workflows/ci-sphinx-doc.yml | 2 +-
doc/developers/documentation.rst | 2 --
doc/requirements.txt | 4 ++++
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/ci-sphinx-doc.yml b/.github/workflows/ci-sphinx-doc.yml
index a5f9d74d1f..e77c766871 100644
--- a/.github/workflows/ci-sphinx-doc.yml
+++ b/.github/workflows/ci-sphinx-doc.yml
@@ -23,7 +23,7 @@ jobs:
- name: Install sphinx and autotools
run: |
sudo apt update
- sudo apt install autoconf make python3-sphinx python3-virtualenv
+ sudo apt install autoconf make python3-virtualenv
- name: Run configure
run: |
diff --git a/doc/developers/documentation.rst b/doc/developers/documentation.rst
index 27c847e125..a303253693 100644
--- a/doc/developers/documentation.rst
+++ b/doc/developers/documentation.rst
@@ -23,8 +23,6 @@ Before building, make sure you have python3 ``virtualenv`` module installed.
# prepare virtual environment
python3 -m virtualenv .venv
. .venv/bin/activate
-
- pip install sphinx # usually packaged in distros
pip install -r requirements.txt
# build documentation
diff --git a/doc/requirements.txt b/doc/requirements.txt
index 742fb8b4bb..6302ecd9f2 100644
--- a/doc/requirements.txt
+++ b/doc/requirements.txt
@@ -1,3 +1,7 @@
+# Use the same sphinx as on readthedocs.org. When updated, make sure
+# sphinx-rtd-theme is compatible with sphinx.
+sphinx==5.3.0
sphinx-rtd-theme==2.0.0
+
linuxdoc==20231020
sphinxcontrib-spelling==7.7.0
--
2.49.0
More information about the ltp
mailing list