]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Docs: Only install sphinx-autobuild for `make htmllive` (GH-119607) (#119622)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 27 May 2024 17:35:57 +0000 (19:35 +0200)
committerGitHub <noreply@github.com>
Mon, 27 May 2024 17:35:57 +0000 (17:35 +0000)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Doc/Makefile
Doc/requirements.txt

index eca574ec290af7687e878c47120966299290c274..1cbfc722b010f57a38529101f848c292595daff8 100644 (file)
@@ -150,10 +150,14 @@ gettext: build
 htmlview: html
        $(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"
 
+.PHONY: ensure-sphinx-autobuild
+ensure-sphinx-autobuild: venv
+       $(VENVDIR)/bin/sphinx-autobuild --version > /dev/null || $(VENVDIR)/bin/python3 -m pip install sphinx-autobuild
+
 .PHONY: htmllive
 htmllive: SPHINXBUILD = $(VENVDIR)/bin/sphinx-autobuild
 htmllive: SPHINXOPTS = --re-ignore="/venv/" --open-browser --delay 0
-htmllive: html
+htmllive: ensure-sphinx-autobuild html
 
 .PHONY: clean
 clean: clean-venv
index 15675ab45fea71324df32fe4c07cae53b506972b..b47a9d8a8635ab460159035b5e4483804297bfef 100644 (file)
@@ -10,7 +10,6 @@ sphinx~=7.3.0
 
 blurb
 
-sphinx-autobuild
 sphinxext-opengraph==0.7.5
 sphinx-notfound-page==1.0.0