Skip to content

Commit 4b90701

Browse files
committed
Revert separate environment for PDF build, add _ensure-sphinxcontrib-svg2pdfconverter Makefile target
1 parent 9cb3ba4 commit 4b90701

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

Doc/Makefile

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# You can set these variables from the command line.
77
PYTHON = python3
88
VENVDIR = ./venv
9-
VENVDIR_PDF = ./venv-pdf
109
UV = uv
1110
SPHINXBUILD = PATH=$(VENVDIR)/bin:$$PATH sphinx-build
1211
BLURB = PATH=$(VENVDIR)/bin:$$PATH blurb
@@ -89,6 +88,7 @@ htmlhelp: build
8988
"build/htmlhelp/pydoc.hhp project file."
9089

9190
.PHONY: latex
91+
latex: _ensure-sphinxcontrib-svg2pdfconverter
9292
latex: BUILDER = latex
9393
latex: build
9494
@echo "Build finished; the LaTeX files are in build/latex."
@@ -164,7 +164,7 @@ clean: clean-venv
164164

165165
.PHONY: clean-venv
166166
clean-venv:
167-
rm -rf $(VENVDIR) $(VENVDIR_PDF)
167+
rm -rf $(VENVDIR)
168168

169169
.PHONY: venv
170170
venv:
@@ -185,12 +185,6 @@ venv:
185185
echo "The venv has been created in the $(VENVDIR) directory"; \
186186
fi
187187

188-
.PHONY: venv-pdf
189-
venv-pdf:
190-
venv-pdf: REQUIREMENTS = requirements-pdf.txt
191-
venv-pdf: VENVDIR = $(VENVDIR_PDF)
192-
venv-pdf: venv
193-
194188
.PHONY: dist-no-html
195189
dist-no-html: dist-text dist-epub dist-texinfo
196190

@@ -238,13 +232,13 @@ dist-text:
238232
@echo "Build finished and archived!"
239233

240234
.PHONY: dist-pdf
241-
dist-pdf:
235+
dist-pdf: _ensure-sphinxcontrib-svg2pdfconverter
242236
# archive the A4 latex
243237
@echo "Building LaTeX (A4 paper)..."
244238
mkdir -p dist
245239
rm -rf build/latex
246240
find dist -name 'python-$(DISTVERSION)-docs-pdf*' -exec rm -rf {} \;
247-
$(MAKE) latex PAPER=a4 VENVDIR=$(VENVDIR_PDF)
241+
$(MAKE) latex PAPER=a4
248242
# remove zip & bz2 dependency on all-pdf,
249243
# as otherwise the full latexmk process is run twice.
250244
# ($$ is needed to escape the $; https://www.gnu.org/software/make/manual/make.html#Basics-of-Variable-References)
@@ -299,6 +293,10 @@ _ensure-pre-commit:
299293
_ensure-sphinx-autobuild:
300294
$(MAKE) _ensure-package PACKAGE=sphinx-autobuild
301295

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

Doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
# Ignore any .rst files in the includes/ directory;
117117
# they're embedded in pages but not rendered as individual pages.
118118
# Ignore any .rst files in the venv/ directory.
119-
exclude_patterns = ['includes/*.rst', 'venv/*', 'venv-pdf/*', 'README.rst']
119+
exclude_patterns = ['includes/*.rst', 'venv/*', 'README.rst']
120120
venvdir = os.getenv('VENVDIR')
121121
if venvdir is not None:
122122
exclude_patterns.append(venvdir + '/*')

Doc/requirements-pdf.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)