summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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