%PYTHON% -c "import sphinx" > nul 2> nul
if errorlevel 1 (
echo Installing sphinx with %PYTHON%
- %PYTHON% -m pip install sphinx python-docs-theme
+ %PYTHON% -m pip install sphinx
+ if errorlevel 1 exit /B
+ )
+ %PYTHON% -c "import python_docs_theme" > nul 2> nul
+ if errorlevel 1 (
+ echo Installing python-docs-theme with %PYTHON%
+ %PYTHON% -m pip install python-docs-theme
if errorlevel 1 exit /B
)
set SPHINXBUILD=%PYTHON% -c "import sphinx, sys; sys.argv[0] = 'sphinx-build'; sphinx.main()"