https://github.com/python/cpython/commit/fc03cdccc0e88fe60f1ea6d659da1f3764379520
commit: fc03cdccc0e88fe60f1ea6d659da1f3764379520
branch: main
author: Maciej Olko <[email protected]>
committer: hugovk <[email protected]>
date: 2026-03-09T18:19:02+02:00
summary:

gh-139588: Docs: fix PDF build (#145480)

files:
M Doc/Makefile
M Doc/conf.py
M Doc/library/profiling.sampling.rst

diff --git a/Doc/Makefile b/Doc/Makefile
index 5b7fdf8ec08ed4..7bdabd8bf168fe 100644
--- a/Doc/Makefile
+++ b/Doc/Makefile
@@ -88,6 +88,7 @@ htmlhelp: build
              "build/htmlhelp/pydoc.hhp project file."
 
 .PHONY: latex
+latex: _ensure-sphinxcontrib-svg2pdfconverter
 latex: BUILDER = latex
 latex: build
        @echo "Build finished; the LaTeX files are in build/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
diff --git a/Doc/conf.py b/Doc/conf.py
index 545049bb460419..26497083d28e47 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -46,6 +46,7 @@
     'linklint.ext',
     'notfound.extension',
     'sphinxext.opengraph',
+    'sphinxcontrib.rsvgconverter',
 )
 for optional_ext in _OPTIONAL_EXTENSIONS:
     try:
diff --git a/Doc/library/profiling.sampling.rst 
b/Doc/library/profiling.sampling.rst
index 078062c08c6020..d2b7d9669ab07e 100644
--- a/Doc/library/profiling.sampling.rst
+++ b/Doc/library/profiling.sampling.rst
@@ -1194,10 +1194,12 @@ data, similar to the ``top`` command for system 
processes::
    python -m profiling.sampling run --live script.py
    python -m profiling.sampling attach --live 12345
 
-.. figure:: tachyon-live-mode-2.gif
-   :alt: Tachyon live mode showing all threads
-   :align: center
-   :width: 100%
+.. only:: not latex
+
+   .. figure:: tachyon-live-mode-2.gif
+      :alt: Tachyon live mode showing all threads
+      :align: center
+      :width: 100%
 
    Live mode displays real-time profiling statistics, showing combined
    data from multiple threads in a multi-threaded application.
@@ -1217,10 +1219,12 @@ main table, showing instruction-level statistics for 
the currently selected
 function. This panel displays which bytecode instructions are executing most
 frequently, including specialized variants and their base opcodes.
 
-.. figure:: tachyon-live-mode-1.gif
-   :alt: Tachyon live mode with opcode panel
-   :align: center
-   :width: 100%
+.. only:: not latex
+
+   .. figure:: tachyon-live-mode-1.gif
+      :alt: Tachyon live mode with opcode panel
+      :align: center
+      :width: 100%
 
    Live mode with ``--opcodes`` enabled shows an opcode panel with a bytecode
    instruction breakdown for the selected function.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to