summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-03-01 08:19:03 +0100
committerGeorg Brandl <georg@python.org>2014-03-01 08:19:03 +0100
commitab37976bcc4e543e1191593f610d6d763fa8b6f2 (patch)
tree35159578e9e4fa7c3570846be8ff28165a50bcdc
parent5be6c44352380d605ddaafff9a1014b1a6730991 (diff)
parentfb3de038561ad63e4cf2844dd75ef6fa87f5c541 (diff)
downloadsphinx-git-ab37976bcc4e543e1191593f610d6d763fa8b6f2.tar.gz
Merged in techtonik/sphinx (pull request #223)
make.bat: Try to find Sphinx through Python if it can not be found
-rw-r--r--sphinx/quickstart.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/sphinx/quickstart.py b/sphinx/quickstart.py
index e181d3ab1..26b420d07 100644
--- a/sphinx/quickstart.py
+++ b/sphinx/quickstart.py
@@ -656,6 +656,14 @@ if "%%1" == "clean" (
)
+REM Check if sphinx-build is available and fallback to Python version if any
+%%SPHINXBUILD%% 2> nul
+if errorlevel 9009 goto sphinx_python
+goto sphinx_ok
+
+:sphinx_python
+
+set SPHINXBUILD=python -m sphinx.__init__
%%SPHINXBUILD%% 2> nul
if errorlevel 9009 (
\techo.
@@ -669,6 +677,9 @@ if errorlevel 9009 (
\texit /b 1
)
+:sphinx_ok
+
+
if "%%1" == "html" (
\t%%SPHINXBUILD%% -b html %%ALLSPHINXOPTS%% %%BUILDDIR%%/html
\tif errorlevel 1 exit /b 1