From 06c81ce1bdbc3e7268a820d5e2c9b6a040e93d2e Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 27 May 2024 17:51:13 +0300 Subject: [PATCH 1/2] Only install sphinx-autobuild for 'make htmllive' --- Doc/Makefile | 6 +++++- Doc/requirements.txt | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Doc/Makefile b/Doc/Makefile index eca574ec290af7..28a06a21ddec5a 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: + $(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 From 728b15f13c5dec6da2543296fd75eb1dcbe32831 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Mon, 27 May 2024 18:10:20 +0300 Subject: [PATCH 2/2] Ensure a venv before instaling sphinx-autobuild --- Doc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/Makefile b/Doc/Makefile index 28a06a21ddec5a..1cbfc722b010f5 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -151,7 +151,7 @@ htmlview: html $(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))" .PHONY: ensure-sphinx-autobuild -ensure-sphinx-autobuild: +ensure-sphinx-autobuild: venv $(VENVDIR)/bin/sphinx-autobuild --version > /dev/null || $(VENVDIR)/bin/python3 -m pip install sphinx-autobuild .PHONY: htmllive