]> granicus.if.org Git - python/commitdiff
bpo-33673: Install python-docs-theme even if Sphinx is already installed (GH-7163)
authorAndrés Delfino <adelfino@gmail.com>
Mon, 28 May 2018 23:20:34 +0000 (20:20 -0300)
committerSteve Dower <steve.dower@microsoft.com>
Mon, 28 May 2018 23:20:34 +0000 (16:20 -0700)
Doc/make.bat

index c69cfae319416406c9a81456142aef1a35d4ffea..3a4b365689dbf61b20c27143be56012c16df323a 100644 (file)
@@ -13,7 +13,13 @@ if not defined SPHINXBUILD (
     %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()"