Skip to content

Commit 7af5246

Browse files
authored
Docs - fix sphinx v8 builds (#9235)
abnormal version selection w/ nbsphinx causing us to fall down to 5.x.x venv install specific versions, fix arguments provided to the sphinx-build
1 parent 1a13ab9 commit 7af5246

File tree

5 files changed

+14
-17
lines changed

5 files changed

+14
-17
lines changed

.github/workflows/documentation.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@ jobs:
2424
python-version: '3.x'
2525
- name: Build documentation
2626
run: |
27-
pip install --user -r doc/requirements.txt
28-
bash ./tests/ci/build_docs.sh
27+
pushd doc/
28+
python3 -mvenv _venv
29+
./_venv/bin/pip install -r requirements.txt
30+
env SPHINXBUILD=$(pwd)/_venv/bin/sphinx-build ../tests/ci/build_docs.sh
31+
popd

doc/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#
33

44
# You can set these variables from the command line.
5-
SPHINXOPTS = -W --keep-going -n
5+
SPHINXOPTS = --fail-on-warning --nitpicky
66
SPHINXBUILD = sphinx-build
77
SPHINXPROJ = ESP8266ArduinoCore
88
SOURCEDIR = .

doc/conf.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
# List of patterns, relative to source directory, that match files and
7272
# directories to ignore when looking for source files.
7373
# This patterns also effect to html_static_path and html_extra_path
74-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
74+
exclude_patterns = ['_venv', '_build', 'Thumbs.db', '.DS_Store']
7575

7676
# The name of the Pygments (syntax highlighting) style to use.
7777
pygments_style = 'sphinx'
@@ -162,11 +162,7 @@
162162
#
163163
# on_rtd is whether we are on readthedocs.org
164164
env_readthedocs = os.environ.get('READTHEDOCS', None)
165-
print(env_readthedocs)
166165

167166
if not env_readthedocs: # only import and set the theme if we're building docs locally
168167
import sphinx_rtd_theme
169168
html_theme = 'sphinx_rtd_theme'
170-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
171-
172-

doc/requirements.txt

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# Requirements file for pip
22
# list of Python packages used in documentation build
3-
sphinx
4-
sphinx-rtd-theme
5-
breathe
6-
nbsphinx
7-
docutils<0.17
8-
testresources
9-
#at the time of writing, requirement is pygments<3,>=2.4.1
10-
pygments>=2.4.1
3+
sphinx>=8.1.2,<9.0.0
4+
sphinx-rtd-theme>=3.0.2,<4.0.0
5+
breathe>=4.36.0,<5.0.0
6+
nbsphinx>=0.9.7,<1.0.0
7+
testresources>=2.0.1,<3.0.0
8+
pygments>=2.19.1,<3.0.0

tests/ci/build_docs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
set -ev
66

77
root=$(git rev-parse --show-toplevel)
8-
env SPHINXOPTS="-W" make -C $root/doc html
8+
make SPHINXOPTS="--fail-on-warning" SPHINXBUILD="${SPHINXBUILD:?sphinx-build}" -C $root/doc html

0 commit comments

Comments
 (0)