Merge pull request #6440 from hugovk/make-doc-PYTHON

Docs: Allow setting Python interpreter via command line
This commit is contained in:
Andrew Murray 2022-07-16 18:20:10 +10:00 committed by GitHub
commit ada4112c61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,8 +2,9 @@
#
# You can set these variables from the command line.
PYTHON = python3
SPHINXOPTS =
SPHINXBUILD = python3 -m sphinx.cmd.build
SPHINXBUILD = $(PYTHON) -m sphinx.cmd.build
PAPER =
BUILDDIR = _build
@ -42,8 +43,8 @@ clean:
-rm -rf $(BUILDDIR)/*
install-sphinx:
python3 -c "import sphinx" > /dev/null 2>&1 || python3 -m pip install sphinx
python3 -c "import furo" > /dev/null 2>&1 || python3 -m pip install furo
$(PYTHON) -c "import sphinx" > /dev/null 2>&1 || $(PYTHON) -m pip install sphinx
$(PYTHON) -c "import furo" > /dev/null 2>&1 || $(PYTHON) -m pip install furo
html:
$(MAKE) install-sphinx
@ -179,4 +180,4 @@ livehtml: html
livereload $(BUILDDIR)/html -p 33233
serve:
cd $(BUILDDIR)/html; python3 -m http.server
cd $(BUILDDIR)/html; $(PYTHON) -m http.server