build: Stop using setup.py to generate documentation

Because `setup.py` is deprecated, let's switch from:

    python setup.py build_sphinx

to:

    make -C docs html

to build Sphinx documentation.

The generated HTML files in `docs/_build/html` are exactly the same (I
compared with `diff -qr`).

Also add `-W` (turn warnings into errors) to the `sphinx-build` options
to keep the previous behavior.
pull/566/head
Adrien Vergé 2 years ago
parent 771c3a0412
commit 16eae28a50

@ -28,7 +28,7 @@ jobs:
- run: doc8 $(git ls-files '*.rst') - run: doc8 $(git ls-files '*.rst')
- run: rstcheck --ignore-directives automodule $(git ls-files '*.rst') - run: rstcheck --ignore-directives automodule $(git ls-files '*.rst')
- run: yamllint --strict $(git ls-files '*.yaml' '*.yml') - run: yamllint --strict $(git ls-files '*.yaml' '*.yml')
- run: python setup.py build_sphinx - run: make -C docs html
- name: Check for broken links in documentation - name: Check for broken links in documentation
run: make -C docs linkcheck run: make -C docs linkcheck

@ -2,7 +2,7 @@
# #
# You can set these variables from the command line. # You can set these variables from the command line.
SPHINXOPTS = SPHINXOPTS = -W
SPHINXBUILD = sphinx-build SPHINXBUILD = sphinx-build
PAPER = PAPER =
BUILDDIR = _build BUILDDIR = _build

@ -3,12 +3,6 @@ import-order-style = pep8
application-import-names = yamllint application-import-names = yamllint
ignore = W503,W504 ignore = W503,W504
[build_sphinx]
all-files = 1
source-dir = docs
build-dir = docs/_build
warning-is-error = 1
[metadata] [metadata]
keywords = keywords =
yaml yaml

Loading…
Cancel
Save