mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
make.bat: Try to find Sphinx through Python if it can not be found
This commit is contained in:
parent
74c7a52eca
commit
fb3de03856
@ -646,6 +646,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.
|
||||
@ -659,6 +667,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
|
||||
|
Loading…
Reference in New Issue
Block a user