From fe1db292596dc352740b1b636a80ac49348996aa Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Fri, 2 Nov 2018 18:56:13 +0100 Subject: [PATCH 1/5] Doc: Make -W (warn as error) more optional, still enforced by CI. Since 859c068e52a31e13e2b9bb6a3f861fa8c290cb0e, CI is enforcing -W so we do not need it unconditionally in Doc/Makefile. Making -W optional would help with i18n builds (some versions, like dev, are not actively maintained by translators, and can easily error). --- .azure-pipelines/docs-steps.yml | 2 +- Doc/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines/docs-steps.yml b/.azure-pipelines/docs-steps.yml index 460576cbc95556..d0ab8511b7bc28 100644 --- a/.azure-pipelines/docs-steps.yml +++ b/.azure-pipelines/docs-steps.yml @@ -24,7 +24,7 @@ steps: - script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full displayName: 'Install LaTeX' - - script: make dist PYTHON=python SPHINXBUILD='python -m sphinx' BLURB='python -m blurb' + - script: make dist PYTHON=python SPHINXOPTS='-W' SPHINXBUILD='python -m sphinx' BLURB='python -m blurb' workingDirectory: '$(build.sourcesDirectory)/Doc' displayName: 'Build documentation' diff --git a/Doc/Makefile b/Doc/Makefile index 50beac58ec3842..042f960b93e7ff 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -12,7 +12,7 @@ PAPER = SOURCES = DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py) -ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -W -D latex_elements.papersize=$(PAPER) \ +ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_elements.papersize=$(PAPER) \ $(SPHINXOPTS) . build/$(BUILDER) $(SOURCES) .PHONY: help build html htmlhelp latex text changes linkcheck \ From 2ffe17a13d86bf7111f0c3d590ee8971ad0ad521 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Sat, 3 Nov 2018 10:28:03 +0100 Subject: [PATCH 2/5] Remove associated news entry. --- Misc/NEWS.d/next/Build/2018-09-06-07-15-20.bpo-34081.cuSTnH.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Build/2018-09-06-07-15-20.bpo-34081.cuSTnH.rst diff --git a/Misc/NEWS.d/next/Build/2018-09-06-07-15-20.bpo-34081.cuSTnH.rst b/Misc/NEWS.d/next/Build/2018-09-06-07-15-20.bpo-34081.cuSTnH.rst deleted file mode 100644 index af385bac231b8e..00000000000000 --- a/Misc/NEWS.d/next/Build/2018-09-06-07-15-20.bpo-34081.cuSTnH.rst +++ /dev/null @@ -1 +0,0 @@ -Make Sphinx warnings as errors in the Docs Makefile. From 37f4cba32e708545a55601e48dfd94f23b13a752 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Sat, 3 Nov 2018 16:08:11 +0100 Subject: [PATCH 3/5] -W by default but optional. --- Doc/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/Makefile b/Doc/Makefile index 042f960b93e7ff..4b85e9eb605803 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -11,9 +11,10 @@ BLURB = PATH=$(VENVDIR)/bin:$$PATH blurb PAPER = SOURCES = DISTVERSION = $(shell $(PYTHON) tools/extensions/patchlevel.py) +SPHINXERRORHANDLING = -W ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees -D latex_elements.papersize=$(PAPER) \ - $(SPHINXOPTS) . build/$(BUILDER) $(SOURCES) + $(SPHINXOPTS) $(SPHINXERRORHANDLING) . build/$(BUILDER) $(SOURCES) .PHONY: help build html htmlhelp latex text changes linkcheck \ suspicious coverage doctest pydoc-topics htmlview clean dist check serve \ From aef828bd991e04251afedfece0975b6c9a7fa4bb Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Sat, 3 Nov 2018 16:08:16 +0100 Subject: [PATCH 4/5] Revert "Remove associated news entry." This reverts commit 2ffe17a13d86bf7111f0c3d590ee8971ad0ad521. --- Misc/NEWS.d/next/Build/2018-09-06-07-15-20.bpo-34081.cuSTnH.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Build/2018-09-06-07-15-20.bpo-34081.cuSTnH.rst diff --git a/Misc/NEWS.d/next/Build/2018-09-06-07-15-20.bpo-34081.cuSTnH.rst b/Misc/NEWS.d/next/Build/2018-09-06-07-15-20.bpo-34081.cuSTnH.rst new file mode 100644 index 00000000000000..af385bac231b8e --- /dev/null +++ b/Misc/NEWS.d/next/Build/2018-09-06-07-15-20.bpo-34081.cuSTnH.rst @@ -0,0 +1 @@ +Make Sphinx warnings as errors in the Docs Makefile. From 5a3e0cbe3eb817d4c83feda441b6aa6383b3fdc0 Mon Sep 17 00:00:00 2001 From: Julien Palard Date: Sat, 3 Nov 2018 16:09:12 +0100 Subject: [PATCH 5/5] No longer needed, -W is still by default. --- .azure-pipelines/docs-steps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.azure-pipelines/docs-steps.yml b/.azure-pipelines/docs-steps.yml index d0ab8511b7bc28..460576cbc95556 100644 --- a/.azure-pipelines/docs-steps.yml +++ b/.azure-pipelines/docs-steps.yml @@ -24,7 +24,7 @@ steps: - script: sudo apt-get update && sudo apt-get install -qy --force-yes texlive-full displayName: 'Install LaTeX' - - script: make dist PYTHON=python SPHINXOPTS='-W' SPHINXBUILD='python -m sphinx' BLURB='python -m blurb' + - script: make dist PYTHON=python SPHINXBUILD='python -m sphinx' BLURB='python -m blurb' workingDirectory: '$(build.sourcesDirectory)/Doc' displayName: 'Build documentation'