bpo-33673: Install python-docs-theme even if Sphinx is already instal… · python/cpython@a379dea

Original file line numberDiff line numberDiff line change

@@ -13,7 +13,13 @@ if not defined SPHINXBUILD (

1313

%PYTHON% -c "import sphinx" > nul 2> nul

1414

if errorlevel 1 (

1515

echo Installing sphinx with %PYTHON%

16-

%PYTHON% -m pip install sphinx python-docs-theme

16+

%PYTHON% -m pip install sphinx

17+

if errorlevel 1 exit /B

18+

)

19+

%PYTHON% -c "import python_docs_theme" > nul 2> nul

20+

if errorlevel 1 (

21+

echo Installing python-docs-theme with %PYTHON%

22+

%PYTHON% -m pip install python-docs-theme

1723

if errorlevel 1 exit /B

1824

)

1925

set SPHINXBUILD=%PYTHON% -c "import sphinx, sys; sys.argv[0] = 'sphinx-build'; sphinx.main()"