Skip to content

Commit db48e8f

Browse files
[3.12] Doc: Add make dist-no-html (GH-124383) (#124388)
1 parent 7cc773b commit db48e8f

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

Doc/Makefile

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,26 @@ venv:
182182
echo "The venv has been created in the $(VENVDIR) directory"; \
183183
fi
184184

185+
.PHONY: dist-no-html
186+
dist-no-html: dist-text dist-pdf dist-epub dist-texinfo
187+
185188
.PHONY: dist
186189
dist:
187190
rm -rf dist
188191
mkdir -p dist
189-
192+
$(MAKE) dist-html
193+
$(MAKE) dist-text
194+
$(MAKE) dist-pdf
195+
$(MAKE) dist-epub
196+
$(MAKE) dist-texinfo
197+
198+
.PHONY: dist-html
199+
dist-html:
190200
# archive the HTML
191201
@echo "Building HTML..."
202+
mkdir -p dist
203+
rm -rf build/html
204+
find dist -name 'python-$(DISTVERSION)-docs-html*' -exec rm -rf {} \;
192205
$(MAKE) html
193206
cp -pPR build/html dist/python-$(DISTVERSION)-docs-html
194207
tar -C dist -cf dist/python-$(DISTVERSION)-docs-html.tar python-$(DISTVERSION)-docs-html
@@ -198,8 +211,13 @@ dist:
198211
rm dist/python-$(DISTVERSION)-docs-html.tar
199212
@echo "Build finished and archived!"
200213

214+
.PHONY: dist-text
215+
dist-text:
201216
# archive the text build
202217
@echo "Building text..."
218+
mkdir -p dist
219+
rm -rf build/text
220+
find dist -name 'python-$(DISTVERSION)-docs-text*' -exec rm -rf {} \;
203221
$(MAKE) text
204222
cp -pPR build/text dist/python-$(DISTVERSION)-docs-text
205223
tar -C dist -cf dist/python-$(DISTVERSION)-docs-text.tar python-$(DISTVERSION)-docs-text
@@ -209,9 +227,13 @@ dist:
209227
rm dist/python-$(DISTVERSION)-docs-text.tar
210228
@echo "Build finished and archived!"
211229

230+
.PHONY: dist-pdf
231+
dist-pdf:
212232
# archive the A4 latex
213233
@echo "Building LaTeX (A4 paper)..."
234+
mkdir -p dist
214235
rm -rf build/latex
236+
find dist -name 'python-$(DISTVERSION)-docs-pdf*' -exec rm -rf {} \;
215237
$(MAKE) latex PAPER=a4
216238
# remove zip & bz2 dependency on all-pdf,
217239
# as otherwise the full latexmk process is run twice.
@@ -222,16 +244,24 @@ dist:
222244
cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-a4.tar.bz2
223245
@echo "Build finished and archived!"
224246

247+
.PHONY: dist-epub
248+
dist-epub:
225249
# copy the epub build
226250
@echo "Building EPUB..."
251+
mkdir -p dist
227252
rm -rf build/epub
253+
rm -f dist/python-$(DISTVERSION)-docs.epub
228254
$(MAKE) epub
229255
cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub
230256
@echo "Build finished and archived!"
231257

258+
.PHONY: dist-texinfo
259+
dist-texinfo:
232260
# archive the texinfo build
233261
@echo "Building Texinfo..."
262+
mkdir -p dist
234263
rm -rf build/texinfo
264+
find dist -name 'python-$(DISTVERSION)-docs-texinfo*' -exec rm -rf {} \;
235265
$(MAKE) texinfo
236266
$(MAKE) info --directory=build/texinfo
237267
cp -pPR build/texinfo dist/python-$(DISTVERSION)-docs-texinfo

Doc/tools/templates/download.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
The link below returns HTTP 404 until the first related alpha release.
88
This is expected; use daily documentation builds for CPython development.
99
#}
10-
{% set dlbase = 'https://docs.python.org/ftp/python/doc/' + release %}
10+
{% set dlbase = 'https://www.python.org/ftp/python/doc/' + release %}
1111
{% endif %}
1212

1313
{% block body %}

0 commit comments

Comments
 (0)