]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-35293: Travis CI uses "make venv" for the doc (GH-22307) (GH-22309) (GH-22310)
authorVictor Stinner <vstinner@python.org>
Fri, 18 Sep 2020 15:21:24 +0000 (17:21 +0200)
committerGitHub <noreply@github.com>
Fri, 18 Sep 2020 15:21:24 +0000 (17:21 +0200)
Doc/requirements.txt becomes the reference for packages and package
versions needed to build the Python documentation.

* Doc/Makefile now uses Doc/requirements.txt
* .travis.yml now uses "make env" of Doc/Makefile
* Update Sphinx to version 2.4.4

(cherry picked from commit 8394500cca56490cc347604d39ca40abcdce46c3)
(cherry picked from commit 9e73cac173e5e9010bd18c8334fffeee1cade3a4)

.travis.yml
Doc/Makefile
Doc/requirements.txt [new file with mode: 0644]

index 2b6fed617526590e48c56411534e61a75b8d432f..39a3cf7e9296406c7309726a2f8837ef38a063ce 100644 (file)
@@ -51,10 +51,7 @@ matrix:
       env: TESTING=docs
       before_script:
         - cd Doc
-        # Sphinx is pinned so that new versions that introduce new warnings won't suddenly cause build failures.
-        # (Updating the version is fine as long as no warnings are raised by doing so.)
-        # The theme used by the docs is stored separately, so we need to install that as well.
-        - python -m pip install sphinx==1.8.2 blurb python-docs-theme
+        - make venv PYTHON=python
       script:
         - make check suspicious html SPHINXOPTS="-q -W -j4"
     - name: "Documentation tests"
index b8ca1edfbc60a58cabc4f29b770329fe1b45bbc4..f653d70674eb1c6565c41c2f2b0dc66cac214599 100644 (file)
@@ -143,7 +143,7 @@ clean:
 venv:
        $(PYTHON) -m venv $(VENVDIR)
        $(VENVDIR)/bin/python3 -m pip install -U pip setuptools
-       $(VENVDIR)/bin/python3 -m pip install -U Sphinx==2.3.1 blurb python-docs-theme
+       $(VENVDIR)/bin/python3 -m pip install -r requirements.txt
        @echo "The venv has been created in the $(VENVDIR) directory"
 
 dist:
diff --git a/Doc/requirements.txt b/Doc/requirements.txt
new file mode 100644 (file)
index 0000000..47b78ee
--- /dev/null
@@ -0,0 +1,12 @@
+# Requirements to build the Python documentation
+
+# Sphinx version is pinned so that new versions that introduce new warnings
+# won't suddenly cause build failures. Updating the version is fine as long
+# as no warnings are raised by doing so.
+sphinx==2.4.4
+
+blurb
+
+# The theme used by the documentation is stored separately, so we need
+# to install that as well.
+python-docs-theme