Skip to content

Commit c0fc5c1

Browse files
committed
make.bat: Try Sphinx installed in Python when sphinx-build is not in PATH
1 parent ee36d45 commit c0fc5c1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/make.bat

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ if "%1" == "clean" (
4747
)
4848

4949

50+
REM Check if sphinx-build is available and fallback to Python version if any
51+
%SPHINXBUILD% 2> nul
52+
if errorlevel 9009 goto sphinx_python
53+
goto spinx_ok
54+
55+
:sphinx_python
56+
57+
set SPHINXBUILD=python -m sphinx.__init__
5058
%SPHINXBUILD% 2> nul
5159
if errorlevel 9009 (
5260
echo.
@@ -60,6 +68,9 @@ if errorlevel 9009 (
6068
exit /b 1
6169
)
6270

71+
:sphinx_ok
72+
73+
6374
if "%1" == "html" (
6475
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
6576
if errorlevel 1 exit /b 1

0 commit comments

Comments
 (0)