]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Doc: Add ``make dist-no-html`` (#124383)
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>
Mon, 23 Sep 2024 22:11:34 +0000 (23:11 +0100)
committerGitHub <noreply@github.com>
Mon, 23 Sep 2024 22:11:34 +0000 (23:11 +0100)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Doc/Makefile
Doc/tools/templates/download.html

index fc0d1e4d9a2a552e1fbc60c9a9f6d71e6a763596..a2d89343648dc178ba250900057adab0dab95ef5 100644 (file)
@@ -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
index f69adc71f937c4a7a2678a6a271d543c7487c28c..b4217908cc63c99e1bc066933d16609307f90698 100644 (file)
@@ -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 %}