Skip to content

Commit fc03cdc

Browse files
authored
gh-139588: Docs: fix PDF build (#145480)
1 parent 27c4970 commit fc03cdc

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

Doc/Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ htmlhelp: build
8888
"build/htmlhelp/pydoc.hhp project file."
8989

9090
.PHONY: latex
91+
latex: _ensure-sphinxcontrib-svg2pdfconverter
9192
latex: BUILDER = latex
9293
latex: build
9394
@echo "Build finished; the LaTeX files are in build/latex."
@@ -231,7 +232,7 @@ dist-text:
231232
@echo "Build finished and archived!"
232233

233234
.PHONY: dist-pdf
234-
dist-pdf:
235+
dist-pdf: _ensure-sphinxcontrib-svg2pdfconverter
235236
# archive the A4 latex
236237
@echo "Building LaTeX (A4 paper)..."
237238
mkdir -p dist
@@ -292,6 +293,10 @@ _ensure-pre-commit:
292293
_ensure-sphinx-autobuild:
293294
$(MAKE) _ensure-package PACKAGE=sphinx-autobuild
294295

296+
.PHONY: _ensure-sphinxcontrib-svg2pdfconverter
297+
_ensure-sphinxcontrib-svg2pdfconverter:
298+
$(MAKE) _ensure-package PACKAGE=sphinxcontrib-svg2pdfconverter
299+
295300
.PHONY: check
296301
check: _ensure-pre-commit
297302
$(VENVDIR)/bin/python3 -m pre_commit run --all-files

Doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
'linklint.ext',
4747
'notfound.extension',
4848
'sphinxext.opengraph',
49+
'sphinxcontrib.rsvgconverter',
4950
)
5051
for optional_ext in _OPTIONAL_EXTENSIONS:
5152
try:

Doc/library/profiling.sampling.rst

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,10 +1194,12 @@ data, similar to the ``top`` command for system processes::
11941194
python -m profiling.sampling run --live script.py
11951195
python -m profiling.sampling attach --live 12345
11961196

1197-
.. figure:: tachyon-live-mode-2.gif
1198-
:alt: Tachyon live mode showing all threads
1199-
:align: center
1200-
:width: 100%
1197+
.. only:: not latex
1198+
1199+
.. figure:: tachyon-live-mode-2.gif
1200+
:alt: Tachyon live mode showing all threads
1201+
:align: center
1202+
:width: 100%
12011203

12021204
Live mode displays real-time profiling statistics, showing combined
12031205
data from multiple threads in a multi-threaded application.
@@ -1217,10 +1219,12 @@ main table, showing instruction-level statistics for the currently selected
12171219
function. This panel displays which bytecode instructions are executing most
12181220
frequently, including specialized variants and their base opcodes.
12191221

1220-
.. figure:: tachyon-live-mode-1.gif
1221-
:alt: Tachyon live mode with opcode panel
1222-
:align: center
1223-
:width: 100%
1222+
.. only:: not latex
1223+
1224+
.. figure:: tachyon-live-mode-1.gif
1225+
:alt: Tachyon live mode with opcode panel
1226+
:align: center
1227+
:width: 100%
12241228

12251229
Live mode with ``--opcodes`` enabled shows an opcode panel with a bytecode
12261230
instruction breakdown for the selected function.

0 commit comments

Comments
 (0)