]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-139588: Docs: fix PDF build (#145741)
authorMaciej Olko <maciej.olko@affirm.com>
Sat, 21 Mar 2026 17:07:12 +0000 (18:07 +0100)
committerGitHub <noreply@github.com>
Sat, 21 Mar 2026 17:07:12 +0000 (19:07 +0200)
Doc/Makefile
Doc/conf.py

index 5b7fdf8ec08ed40cffaffb8bad3e69a677458fee..6eb466a34176266b2203d85557dbd9bd4fe44cc9 100644 (file)
@@ -89,7 +89,8 @@ htmlhelp: build
 
 .PHONY: latex
 latex: BUILDER = latex
-latex: build
+latex: _ensure-sphinxcontrib-svg2pdfconverter
+       $(MAKE) build BUILDER=$(BUILDER)
        @echo "Build finished; the LaTeX files are in build/latex."
        @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
              "run these through (pdf)latex."
@@ -231,7 +232,7 @@ dist-text:
        @echo "Build finished and archived!"
 
 .PHONY: dist-pdf
-dist-pdf:
+dist-pdf: _ensure-sphinxcontrib-svg2pdfconverter
        # archive the A4 latex
        @echo "Building LaTeX (A4 paper)..."
        mkdir -p dist
@@ -292,6 +293,10 @@ _ensure-pre-commit:
 _ensure-sphinx-autobuild:
        $(MAKE) _ensure-package PACKAGE=sphinx-autobuild
 
+.PHONY: _ensure-sphinxcontrib-svg2pdfconverter
+_ensure-sphinxcontrib-svg2pdfconverter:
+       $(MAKE) _ensure-package PACKAGE=sphinxcontrib-svg2pdfconverter
+
 .PHONY: check
 check: _ensure-pre-commit
        $(VENVDIR)/bin/python3 -m pre_commit run --all-files
index c0e26f4f7e1458435848b589df89322d55aa13a2..f4427819eda82f89230165f936eeb8d93afa2a81 100644 (file)
@@ -45,6 +45,7 @@ _OPTIONAL_EXTENSIONS = (
     'linklint.ext',
     'notfound.extension',
     'sphinxext.opengraph',
+    'sphinxcontrib.rsvgconverter',
 )
 for optional_ext in _OPTIONAL_EXTENSIONS:
     try: