https://github.com/python/cpython/commit/e658d87ad4f83093450671cf56293d207dcf6138
commit: e658d87ad4f83093450671cf56293d207dcf6138
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: hugovk <[email protected]>
date: 2024-05-27T17:35:57Z
summary:

[3.12] Docs: Only install sphinx-autobuild for `make htmllive` (GH-119607) 
(#119622)

Co-authored-by: Hugo van Kemenade <[email protected]>

files:
M Doc/Makefile
M Doc/requirements.txt

diff --git a/Doc/Makefile b/Doc/Makefile
index eca574ec290af7..1cbfc722b010f5 100644
--- a/Doc/Makefile
+++ b/Doc/Makefile
@@ -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
diff --git a/Doc/requirements.txt b/Doc/requirements.txt
index 15675ab45fea71..b47a9d8a8635ab 100644
--- a/Doc/requirements.txt
+++ b/Doc/requirements.txt
@@ -10,7 +10,6 @@ sphinx~=7.3.0
 
 blurb
 
-sphinx-autobuild
 sphinxext-opengraph==0.7.5
 sphinx-notfound-page==1.0.0
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to