summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>2024-09-23 22:11:34 (GMT)
committerGitHub <noreply@github.com>2024-09-23 22:11:34 (GMT)
commit0060486862bfa8e6583beb627be154daaaaa9e2a (patch)
tree75fc56648ad3be5b076640aaa6351ef2eea4f7c3 /Doc
parent67201ad53ff11576c69a9b762540b77128285f8d (diff)
downloadcpython-0060486862bfa8e6583beb627be154daaaaa9e2a.zip
cpython-0060486862bfa8e6583beb627be154daaaaa9e2a.tar.gz
cpython-0060486862bfa8e6583beb627be154daaaaa9e2a.tar.bz2
Doc: Add ``make dist-no-html`` (#124383)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Makefile32
-rw-r--r--Doc/tools/templates/download.html2
2 files changed, 32 insertions, 2 deletions
diff --git a/Doc/Makefile b/Doc/Makefile
index fc0d1e4..a2d8934 100644
--- a/Doc/Makefile
+++ b/Doc/Makefile
@@ -182,13 +182,26 @@ venv:
echo "The venv has been created in the $(VENVDIR) directory"; \
fi
+.PHONY: dist-no-html
+dist-no-html: dist-text dist-pdf dist-epub dist-texinfo
+
.PHONY: dist
dist:
rm -rf dist
mkdir -p dist
-
+ $(MAKE) dist-html
+ $(MAKE) dist-text
+ $(MAKE) dist-pdf
+ $(MAKE) dist-epub
+ $(MAKE) dist-texinfo
+
+.PHONY: dist-html
+dist-html:
# archive the HTML
@echo "Building HTML..."
+ mkdir -p dist
+ rm -rf build/html
+ find dist -name 'python-$(DISTVERSION)-docs-html*' -exec rm -rf {} \;
$(MAKE) html
cp -pPR build/html dist/python-$(DISTVERSION)-docs-html
tar -C dist -cf dist/python-$(DISTVERSION)-docs-html.tar python-$(DISTVERSION)-docs-html
@@ -198,8 +211,13 @@ dist:
rm dist/python-$(DISTVERSION)-docs-html.tar
@echo "Build finished and archived!"
+.PHONY: dist-text
+dist-text:
# archive the text build
@echo "Building text..."
+ mkdir -p dist
+ rm -rf build/text
+ find dist -name 'python-$(DISTVERSION)-docs-text*' -exec rm -rf {} \;
$(MAKE) text
cp -pPR build/text dist/python-$(DISTVERSION)-docs-text
tar -C dist -cf dist/python-$(DISTVERSION)-docs-text.tar python-$(DISTVERSION)-docs-text
@@ -209,9 +227,13 @@ dist:
rm dist/python-$(DISTVERSION)-docs-text.tar
@echo "Build finished and archived!"
+.PHONY: dist-pdf
+dist-pdf:
# archive the A4 latex
@echo "Building LaTeX (A4 paper)..."
+ mkdir -p dist
rm -rf build/latex
+ find dist -name 'python-$(DISTVERSION)-docs-pdf*' -exec rm -rf {} \;
$(MAKE) latex PAPER=a4
# remove zip & bz2 dependency on all-pdf,
# as otherwise the full latexmk process is run twice.
@@ -222,16 +244,24 @@ dist:
cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-a4.tar.bz2
@echo "Build finished and archived!"
+.PHONY: dist-epub
+dist-epub:
# copy the epub build
@echo "Building EPUB..."
+ mkdir -p dist
rm -rf build/epub
+ rm -f dist/python-$(DISTVERSION)-docs.epub
$(MAKE) epub
cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub
@echo "Build finished and archived!"
+.PHONY: dist-texinfo
+dist-texinfo:
# archive the texinfo build
@echo "Building Texinfo..."
+ mkdir -p dist
rm -rf build/texinfo
+ find dist -name 'python-$(DISTVERSION)-docs-texinfo*' -exec rm -rf {} \;
$(MAKE) texinfo
$(MAKE) info --directory=build/texinfo
cp -pPR build/texinfo dist/python-$(DISTVERSION)-docs-texinfo
diff --git a/Doc/tools/templates/download.html b/Doc/tools/templates/download.html
index f69adc7..b421790 100644
--- a/Doc/tools/templates/download.html
+++ b/Doc/tools/templates/download.html
@@ -7,7 +7,7 @@
The link below returns HTTP 404 until the first related alpha release.
This is expected; use daily documentation builds for CPython development.
#}
- {% set dlbase = 'https://docs.python.org/ftp/python/doc/' + release %}
+ {% set dlbase = 'https://www.python.org/ftp/python/doc/' + release %}
{% endif %}
{% block body %}