Skip to content

Commit 16c2ed8

Browse files
mitya57websurfer5
authored andcommitted
bpo-37504: Fix documentation build with texinfo builder (pythonGH-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.htm#AEN348 [2]: https://github.com/sphinx-doc/sphinx/blob/v2.1.2/sphinx/writers/texinfo.py#L1129 * Doc: Add texinfo support to the Makefile
1 parent fde28d2 commit 16c2ed8

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

Doc/Makefile

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ PAPEROPT_letter = -D latex_elements.papersize=letterpaper
2020
ALLSPHINXOPTS = -b $(BUILDER) -d build/doctrees $(PAPEROPT_$(PAPER)) \
2121
$(SPHINXOPTS) $(SPHINXERRORHANDLING) . build/$(BUILDER) $(SOURCES)
2222

23-
.PHONY: help build html htmlhelp latex text changes linkcheck \
23+
.PHONY: help build html htmlhelp latex text texinfo changes linkcheck \
2424
suspicious coverage doctest pydoc-topics htmlview clean dist check serve \
2525
autobuild-dev autobuild-stable venv
2626

@@ -33,6 +33,7 @@ help:
3333
@echo " htmlhelp to make HTML files and a HTML help project"
3434
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
3535
@echo " text to make plain text files"
36+
@echo " texinfo to make Texinfo file"
3637
@echo " epub to make EPUB files"
3738
@echo " changes to make an overview over all changed/added/deprecated items"
3839
@echo " linkcheck to check all external links for integrity"
@@ -89,6 +90,11 @@ text: BUILDER = text
8990
text: build
9091
@echo "Build finished; the text files are in build/text."
9192

93+
texinfo: BUILDER = texinfo
94+
texinfo: build
95+
@echo "Build finished; the python.texi file is in build/texinfo."
96+
@echo "Run \`make info' in that directory to run it through makeinfo."
97+
9298
epub: BUILDER = epub
9399
epub: build
94100
@echo "Build finished; the epub files are in build/epub."
@@ -183,6 +189,17 @@ dist:
183189
make epub
184190
cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub
185191

192+
# archive the texinfo build
193+
rm -rf build/texinfo
194+
make texinfo
195+
make info --directory=build/texinfo
196+
cp -pPR build/texinfo dist/python-$(DISTVERSION)-docs-texinfo
197+
tar -C dist -cf dist/python-$(DISTVERSION)-docs-texinfo.tar python-$(DISTVERSION)-docs-texinfo
198+
bzip2 -9 -k dist/python-$(DISTVERSION)-docs-texinfo.tar
199+
(cd dist; zip -q -r -9 python-$(DISTVERSION)-docs-texinfo.zip python-$(DISTVERSION)-docs-texinfo)
200+
rm -r dist/python-$(DISTVERSION)-docs-texinfo
201+
rm dist/python-$(DISTVERSION)-docs-texinfo.tar
202+
186203
check:
187204
$(PYTHON) tools/rstlint.py -i tools -i $(VENVDIR) -i README.rst
188205

Doc/tools/extensions/pyspecific.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,7 @@ def process_audit_events(app, doctree, fromdocname):
540540
nodes.colspec(colwidth=30),
541541
nodes.colspec(colwidth=55),
542542
nodes.colspec(colwidth=15),
543+
cols=3,
543544
)
544545
head = nodes.thead()
545546
body = nodes.tbody()

0 commit comments

Comments
 (0)