[Python-checkins] bpo-37504: Fix documentation build with texinfo builder (GH-14606)

Steve Dower webhook-mailer at python.org
Tue Sep 10 10:51:48 EDT 2019


https://github.com/python/cpython/commit/313f80192a7396ea3e5ab107175afe4c5a017ab8
commit: 313f80192a7396ea3e5ab107175afe4c5a017ab8
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Steve Dower <steve.dower at python.org>
date: 2019-09-10T15:51:43+01:00
summary:

bpo-37504: Fix documentation build with texinfo builder (GH-14606)

In the table model used by docutils, the `cols` attribute of `tgroup`
nodes is mandatory, see [1]. It is used in texinfo builder in [2].

[1]: https://www.oasis-open.org/specs/tm9901.htmGH-AEN348
[2]: https://github.com/sphinx-doc/sphinx/blob/v2.1.2/sphinx/writers/texinfo.pyGH-L1129

* Doc: Add texinfo support to the Makefile
(cherry picked from commit c3d679fd398f42a2e489fbe3dab17fac1fb2439c)

Co-authored-by: Dmitry Shachnev <mitya57 at users.noreply.github.com>

files:
M Doc/Makefile
M Doc/tools/extensions/pyspecific.py

diff --git a/Doc/Makefile b/Doc/Makefile
index 05eeab9124df..f589b6e75f61 100644
--- a/Doc/Makefile
+++ b/Doc/Makefile
@@ -20,7 +20,7 @@ PAPEROPT_letter = -D latex_elements.papersize=letterpaper
 ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees $(PAPEROPT_$(PAPER)) \
                 $(SPHINXOPTS) $(SPHINXERRORHANDLING) . build/$(BUILDER) $(SOURCES)
 
-.PHONY: help build html htmlhelp latex text changes linkcheck \
+.PHONY: help build html htmlhelp latex text texinfo changes linkcheck \
 	suspicious coverage doctest pydoc-topics htmlview clean dist check serve \
 	autobuild-dev autobuild-stable venv
 
@@ -33,6 +33,7 @@ help:
 	@echo "  htmlhelp   to make HTML files and a HTML help project"
 	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
 	@echo "  text       to make plain text files"
+	@echo "  texinfo    to make Texinfo file"
 	@echo "  epub       to make EPUB files"
 	@echo "  changes    to make an overview over all changed/added/deprecated items"
 	@echo "  linkcheck  to check all external links for integrity"
@@ -89,6 +90,11 @@ text: BUILDER = text
 text: build
 	@echo "Build finished; the text files are in build/text."
 
+texinfo: BUILDER = texinfo
+texinfo: build
+	@echo "Build finished; the python.texi file is in build/texinfo."
+	@echo "Run \`make info' in that directory to run it through makeinfo."
+
 epub: BUILDER = epub
 epub: build
 	@echo "Build finished; the epub files are in build/epub."
@@ -183,6 +189,17 @@ dist:
 	make epub
 	cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub
 
+	# archive the texinfo build
+	rm -rf build/texinfo
+	make texinfo
+	make info --directory=build/texinfo
+	cp -pPR build/texinfo dist/python-$(DISTVERSION)-docs-texinfo
+	tar -C dist -cf dist/python-$(DISTVERSION)-docs-texinfo.tar python-$(DISTVERSION)-docs-texinfo
+	bzip2 -9 -k dist/python-$(DISTVERSION)-docs-texinfo.tar
+	(cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-texinfo.zip python-$(DISTVERSION)-docs-texinfo)
+	rm -r dist/python-$(DISTVERSION)-docs-texinfo
+	rm dist/python-$(DISTVERSION)-docs-texinfo.tar
+
 check:
 	$(PYTHON) tools/rstlint.py -i tools -i $(VENVDIR) -i README.rst
 
diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py
index f41077b07615..82dfc6bb263b 100644
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -540,6 +540,7 @@ def process_audit_events(app, doctree, fromdocname):
         nodes.colspec(colwidth=30),
         nodes.colspec(colwidth=55),
         nodes.colspec(colwidth=15),
+        cols=3,
     )
     head = nodes.thead()
     body = nodes.tbody()



More information about the Python-checkins mailing list