Infra: Only install sphinx-autobuild for `make htmllive` (#3796)

This commit is contained in:
Hugo van Kemenade 2024-05-28 08:47:37 +03:00 committed by GitHub
parent 1f3e7386ef
commit f3b9e446fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -26,11 +26,15 @@ html: venv
htmlview: html
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/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
## htmllive to rebuild and reload HTML files in your browser
.PHONY: htmllive
htmllive: SPHINXBUILD = $(VENVDIR)/bin/sphinx-autobuild
htmllive: SPHINXERRORHANDLING = --re-ignore="/\.idea/|/venv/|/pep-0000.rst|/topic/" --open-browser --delay 0
htmllive: html
htmllive: ensure-sphinx-autobuild html
## dirhtml to render PEPs to "index.html" files within "pep-NNNN" directories
.PHONY: dirhtml

View File

@ -5,8 +5,6 @@ Pygments >= 2.9.0
Sphinx >= 5.1.1, != 6.1.0, != 6.1.1
docutils >= 0.19.0
sphinx-autobuild
# For tests
pytest
pytest-cov