Skip to content

Commit 897ea1d

Browse files
committed
Update Sphinx makefiles with options used on readthedocs
1 parent ac036e4 commit 897ea1d

File tree

2 files changed

+14
-49
lines changed

2 files changed

+14
-49
lines changed

doc/Makefile

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ PYTHONPATH =
1313
# Internal variables.
1414
PAPEROPT_a4 = -D latex_paper_size=a4
1515
PAPEROPT_letter = -D latex_paper_size=letter
16-
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
16+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees -T -E -W --keep-going $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
1717

18-
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest all
18+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck
1919

2020
help:
2121
@echo "Please use \`make <target>' where <target> is one of"
@@ -34,21 +34,21 @@ help:
3434
@echo " man to make manual pages"
3535
@echo " changes to make an overview of all changed/added/deprecated items"
3636
@echo " linkcheck to check all external links for integrity"
37-
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
3837

3938
clean:
4039
-rm -rf $(BUILDDIR)/*
41-
-rm -f reference_guide/features.rst
42-
-rm -f extensions.rst
4340

44-
html: features.rst extensions.rst
41+
html:
4542
@echo
4643
@echo "Install dependencies"
47-
$(PIP) install python-docs-theme
44+
$(PIP) install furo
4845
@echo "Finished installing dependencies"
4946
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
47+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
5048
@echo
51-
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
49+
@echo "Link check complete; look for any errors in the above output " \
50+
"or in $(BUILDDIR)/linkcheck/output.txt."
51+
5252

5353
dirhtml:
5454
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@@ -132,22 +132,3 @@ linkcheck:
132132
@echo
133133
@echo "Link check complete; look for any errors in the above output " \
134134
"or in $(BUILDDIR)/linkcheck/output.txt."
135-
136-
doctest:
137-
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
138-
@echo "Testing of doctests in the sources finished, look at the " \
139-
"results in $(BUILDDIR)/doctest/output.txt."
140-
141-
142-
extensions.rst: exts/pylint_extensions.py
143-
extensions.rst: $(shell find ../pylint/extensions -type f -regex '.*\.py')
144-
extensions.rst: $(shell find ../pylint/extensions -type f -regex '.*\.rst')
145-
rm -f extensions.rst
146-
PYTHONPATH=$(PYTHONPATH) $(PYTHON) ./exts/pylint_extensions.py
147-
148-
features.rst: exts/pylint_features.py
149-
features.rst: $(shell find ../pylint/checkers -type f -regex '.*\.py')
150-
rm -f features.rst
151-
PYTHONPATH=$(PYTHONPATH) $(PYTHON) ./exts/pylint_features.py
152-
153-
messages: $(PYTHONPATH) $(PYTHON) ./exts/pylint_messages.py

doc/make.bat

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ if "%SPHINXBUILD%" == "" (
66
set SPHINXBUILD=sphinx-build
77
)
88
set BUILDDIR=_build
9-
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
10-
set I18NSPHINXOPTS=%SPHINXOPTS% .
9+
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees -T -E -W --keep-going .
1110
if NOT "%PAPER%" == "" (
1211
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
13-
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
1412
)
1513

1614
if "%1" == "" goto help
@@ -34,7 +32,6 @@ if "%1" == "help" (
3432
echo. gettext to make PO message catalogs
3533
echo. changes to make an overview over all changed/added/deprecated items
3634
echo. linkcheck to check all external links for integrity
37-
echo. doctest to run all doctests embedded in the documentation if enabled
3835
goto end
3936
)
4037

@@ -46,17 +43,13 @@ if "%1" == "clean" (
4643

4744

4845
if "%1" == "html" (
49-
rm -f features.rst
50-
echo Pylint features > reference_guide/features.rst
51-
echo =============== >> reference_guide/features.rst
52-
echo >> reference_guide/features.rst
53-
echo .. generated by pylint --full-documentation >> reference_guide/features.rst
54-
echo >> reference_guide/features.rst
55-
python -m pylint --full-documentation >> reference_guide/features.rst
5646
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
5747
if errorlevel 1 exit /b 1
48+
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
49+
if errorlevel 1 exit /b 1
5850
echo.
59-
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
51+
echo.Link check complete; look for any errors in the above output ^
52+
or in %BUILDDIR%/linkcheck/output.txt.
6053
goto end
6154
)
6255

@@ -162,7 +155,7 @@ if "%1" == "texinfo" (
162155
)
163156

164157
if "%1" == "gettext" (
165-
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
158+
%SPHINXBUILD% -b gettext %ALLSPHINXOPTS% %BUILDDIR%/locale
166159
if errorlevel 1 exit /b 1
167160
echo.
168161
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
@@ -186,13 +179,4 @@ or in %BUILDDIR%/linkcheck/output.txt.
186179
goto end
187180
)
188181

189-
if "%1" == "doctest" (
190-
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
191-
if errorlevel 1 exit /b 1
192-
echo.
193-
echo.Testing of doctests in the sources finished, look at the ^
194-
results in %BUILDDIR%/doctest/output.txt.
195-
goto end
196-
)
197-
198182
:end

0 commit comments

Comments
 (0)