]> granicus.if.org Git - esp-idf/commitdiff
docs: Call 'python -m sphinx' instead of sphinx-build
authorAngus Gratton <angus@espressif.com>
Wed, 29 Aug 2018 04:00:41 +0000 (12:00 +0800)
committerAngus Gratton <gus@projectgus.com>
Wed, 29 Aug 2018 06:43:42 +0000 (14:43 +0800)
Fixes mismatches where default Python interpreter may not match the most recently
installed sphinx-build wrapper script (if sphinx 2 & 3 both installed, pip will
clobber any previous copy of /bin/sphinx-build when it installs the new one.)

docs/docs_common.mk

index 85056dc3944b9209ffee13e97313750069895159..c79cb0d4b6bd0612827e57031992e1f9f3d423f5 100644 (file)
 
 # You can set these variables from the command line.
 SPHINXOPTS    =
-SPHINXBUILD   = sphinx-build
+# note: this is changed from sphinx-build so it depends on default python interpreter, not on /bin/sphinx-build
+# (which will be the most recently installed version of sphinx and may not match)
+SPHINXBUILD   = python2 -m sphinx
 PAPER         =
 BUILDDIR      = _build
 
-# User-friendly check for sphinx-build
-ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
-$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don\'t have Sphinx installed, grab it from http://sphinx-doc.org/)
-endif
-
 # Internal variables.
 PAPEROPT_a4     = -D latex_paper_size=a4
 PAPEROPT_letter = -D latex_paper_size=letter