[3.12] Doc: Add `make dist-no-html` (GH-124383) (#124388)

This commit is contained in:
Miss Islington (bot) 2024-09-24 00:19:18 +02:00 committed by GitHub
parent 7cc773ba3d
commit db48e8f84d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 31 additions and 1 deletions

View file

@ -182,13 +182,26 @@ venv:
echo "The venv has been created in the $(VENVDIR) directory"; \ echo "The venv has been created in the $(VENVDIR) directory"; \
fi fi
.PHONY: dist-no-html
dist-no-html: dist-text dist-pdf dist-epub dist-texinfo
.PHONY: dist .PHONY: dist
dist: dist:
rm -rf dist rm -rf dist
mkdir -p 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 # archive the HTML
@echo "Building HTML..." @echo "Building HTML..."
mkdir -p dist
rm -rf build/html
find dist -name 'python-$(DISTVERSION)-docs-html*' -exec rm -rf {} \;
$(MAKE) html $(MAKE) html
cp -pPR build/html dist/python-$(DISTVERSION)-docs-html cp -pPR build/html dist/python-$(DISTVERSION)-docs-html
tar -C dist -cf dist/python-$(DISTVERSION)-docs-html.tar 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 rm dist/python-$(DISTVERSION)-docs-html.tar
@echo "Build finished and archived!" @echo "Build finished and archived!"
.PHONY: dist-text
dist-text:
# archive the text build # archive the text build
@echo "Building text..." @echo "Building text..."
mkdir -p dist
rm -rf build/text
find dist -name 'python-$(DISTVERSION)-docs-text*' -exec rm -rf {} \;
$(MAKE) text $(MAKE) text
cp -pPR build/text dist/python-$(DISTVERSION)-docs-text cp -pPR build/text dist/python-$(DISTVERSION)-docs-text
tar -C dist -cf dist/python-$(DISTVERSION)-docs-text.tar 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 rm dist/python-$(DISTVERSION)-docs-text.tar
@echo "Build finished and archived!" @echo "Build finished and archived!"
.PHONY: dist-pdf
dist-pdf:
# archive the A4 latex # archive the A4 latex
@echo "Building LaTeX (A4 paper)..." @echo "Building LaTeX (A4 paper)..."
mkdir -p dist
rm -rf build/latex rm -rf build/latex
find dist -name 'python-$(DISTVERSION)-docs-pdf*' -exec rm -rf {} \;
$(MAKE) latex PAPER=a4 $(MAKE) latex PAPER=a4
# remove zip & bz2 dependency on all-pdf, # remove zip & bz2 dependency on all-pdf,
# as otherwise the full latexmk process is run twice. # 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 cp build/latex/docs-pdf.tar.bz2 dist/python-$(DISTVERSION)-docs-pdf-a4.tar.bz2
@echo "Build finished and archived!" @echo "Build finished and archived!"
.PHONY: dist-epub
dist-epub:
# copy the epub build # copy the epub build
@echo "Building EPUB..." @echo "Building EPUB..."
mkdir -p dist
rm -rf build/epub rm -rf build/epub
rm -f dist/python-$(DISTVERSION)-docs.epub
$(MAKE) epub $(MAKE) epub
cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub cp -pPR build/epub/Python.epub dist/python-$(DISTVERSION)-docs.epub
@echo "Build finished and archived!" @echo "Build finished and archived!"
.PHONY: dist-texinfo
dist-texinfo:
# archive the texinfo build # archive the texinfo build
@echo "Building Texinfo..." @echo "Building Texinfo..."
mkdir -p dist
rm -rf build/texinfo rm -rf build/texinfo
find dist -name 'python-$(DISTVERSION)-docs-texinfo*' -exec rm -rf {} \;
$(MAKE) texinfo $(MAKE) texinfo
$(MAKE) info --directory=build/texinfo $(MAKE) info --directory=build/texinfo
cp -pPR build/texinfo dist/python-$(DISTVERSION)-docs-texinfo cp -pPR build/texinfo dist/python-$(DISTVERSION)-docs-texinfo

View file

@ -7,7 +7,7 @@
The link below returns HTTP 404 until the first related alpha release. The link below returns HTTP 404 until the first related alpha release.
This is expected; use daily documentation builds for CPython development. 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 %} {% endif %}
{% block body %} {% block body %}