mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Jonathan Corbet <corbet@lwn.net>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
	"Akira Yokosawa" <akiyks@gmail.com>,
	"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 13/15] docs: sphinx: add a file with the requirements for lowest version
Date: Sat, 21 Jun 2025 21:55:52 +0200	[thread overview]
Message-ID: <3bfcb9d4ddb303e2f0dd678fc590bac52bb4c1dc.1750535171.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1750535171.git.mchehab+huawei@kernel.org>

Those days, it is hard to install a virtual env that would
build docs with Sphinx 3.4.3, as even python 3.13 is not
compatible anymore with it.

	/usr/bin/python3.9 -m venv sphinx_3.4.3
	. sphinx_3.4.3/bin/activate
	pip install -r Documentation/sphinx/min_requirements.txt

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
 Documentation/doc-guide/sphinx.rst        | 23 +++++++++++++++++++++++
 Documentation/sphinx/min_requirements.txt | 10 ++++++++++
 2 files changed, 33 insertions(+)
 create mode 100644 Documentation/sphinx/min_requirements.txt

diff --git a/Documentation/doc-guide/sphinx.rst b/Documentation/doc-guide/sphinx.rst
index 5a91df105141..607589592bfb 100644
--- a/Documentation/doc-guide/sphinx.rst
+++ b/Documentation/doc-guide/sphinx.rst
@@ -131,6 +131,29 @@ It supports two optional parameters:
 ``--no-virtualenv``
 	Use OS packaging for Sphinx instead of Python virtual environment.
 
+Installing Sphinx Minimal Version
+---------------------------------
+
+When changing Sphinx build system, it is important to ensure that
+the minimal version will still be supported. Nowadays, it is
+becoming harder to do that on modern distributions, as it is not
+possible to install with Python 3.13 and above.
+
+Testing with the lowest supported Python version as defined at
+Documentation/process/changes.rst can be done by creating
+a venv with it with, and install minimal requirements with::
+
+	/usr/bin/python3.9 -m venv sphinx_min
+	. sphinx_min/bin/activate
+	pip install -r Documentation/sphinx/min_requirements.txt
+
+A more comprehensive test can be done by using:
+
+	scripts/test_doc_build.py
+
+Such script create one Python venv per supported version,
+optionally building documentation for a range of Sphinx versions.
+
 
 Sphinx Build
 ============
diff --git a/Documentation/sphinx/min_requirements.txt b/Documentation/sphinx/min_requirements.txt
new file mode 100644
index 000000000000..52d9f27010e8
--- /dev/null
+++ b/Documentation/sphinx/min_requirements.txt
@@ -0,0 +1,10 @@
+alabaster >=0.7,<0.8
+docutils>=0.15,<0.18
+jinja2>=2.3,<3.1
+PyYAML>=5.1,<6.1
+Sphinx==3.4.3
+sphinxcontrib-applehelp==1.0.2
+sphinxcontrib-devhelp==1.0.1
+sphinxcontrib-htmlhelp==1.0.3
+sphinxcontrib-qthelp==1.0.2
+sphinxcontrib-serializinghtml==1.1.4
-- 
2.49.0


  parent reply	other threads:[~2025-06-21 19:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-21 19:55 [PATCH v2 00/15] Some improvements and fixes for the doc build system Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 01/15] docs: conf.py: properly handle include and exclude patterns Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 02/15] docs: Makefile: disable check rules on make cleandocs Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 03/15] scripts: scripts/test_doc_build.py: add script to test doc build Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 04/15] scripts: test_doc_build.py: make capture assynchronous Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 05/15] scripts: test_doc_build.py: better control its output Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 06/15] scripts: test_doc_build.py: better adjust to python version Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 07/15] scripts: test_doc_build.py: improve dependency list Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 08/15] scripts: test_doc_build.py: improve cmd.log logic Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 09/15] scripts: test_doc_build.py: make the script smarter Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 10/15] scripts: sphinx-pre-install: properly handle SPHINXBUILD Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 11/15] scripts: sphinx-pre-install: fix release detection for Fedora Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 12/15] scripts: test_doc_build.py: regroup and rename arguments Mauro Carvalho Chehab
2025-06-21 19:55 ` Mauro Carvalho Chehab [this message]
2025-06-21 19:55 ` [PATCH v2 14/15] docs: conf.py: several coding style fixes Mauro Carvalho Chehab
2025-06-21 19:55 ` [PATCH v2 15/15] docs: conf.py: Check Sphinx and docutils version Mauro Carvalho Chehab
2025-06-21 20:09 ` [PATCH v2 00/15] Some improvements and fixes for the doc build system Jonathan Corbet
2025-06-22  5:48   ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3bfcb9d4ddb303e2f0dd678fc590bac52bb4c1dc.1750535171.git.mchehab+huawei@kernel.org \
    --to=mchehab+huawei@kernel.org \
    --cc=akiyks@gmail.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®