diff options
author | Steve Dower <steve.dower@microsoft.com> | 2017-09-04 21:26:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-04 21:26:27 (GMT) |
commit | d5cd21d75a27a377f2f9c8370fd8e8c7efaeefb1 (patch) | |
tree | 99f9087afb715ff697a5e855d7febf38223388a1 /Doc | |
parent | 14ce158e3d7c64cfcd2e74246bcafe088b95af2c (diff) | |
download | cpython-d5cd21d75a27a377f2f9c8370fd8e8c7efaeefb1.zip cpython-d5cd21d75a27a377f2f9c8370fd8e8c7efaeefb1.tar.gz cpython-d5cd21d75a27a377f2f9c8370fd8e8c7efaeefb1.tar.bz2 |
Fixes doc/make.bat to properly handle quoted paths. (#3302)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/make.bat | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Doc/make.bat b/Doc/make.bat index b9e8a75..b03372a 100644 --- a/Doc/make.bat +++ b/Doc/make.bat @@ -6,18 +6,18 @@ pushd %~dp0 set this=%~n0 call ..\PCBuild\find_python.bat %PYTHON% -if "%SPHINXBUILD%" EQU "" if "%PYTHON%" NEQ "" ( - set SPHINXBUILD=%PYTHON%\..\Scripts\sphinx-build.exe - rem Cannot use %SPHINXBUILD% in the same block where we set it - if not exist "%PYTHON%\..\Scripts\sphinx-build.exe" ( +if not defined SPHINXBUILD if defined PYTHON ( + %PYTHON% -c "import sphinx" > nul 2> nul + if errorlevel 1 ( echo Installing sphinx with %PYTHON% - "%PYTHON%" -m pip install sphinx + %PYTHON% -m pip install sphinx if errorlevel 1 exit /B ) + set SPHINXBUILD=%PYTHON% -c "import sphinx, sys; sys.argv[0] = 'sphinx-build'; sphinx.main()" ) -if "%PYTHON%" EQU "" set PYTHON=py -if "%SPHINXBUILD%" EQU "" set SPHINXBUILD=sphinx-build +if not defined PYTHON set PYTHON=py +if not defined SPHINXBUILD set SPHINXBUILD=sphinx-build if "%1" NEQ "htmlhelp" goto :skiphhcsearch if exist "%HTMLHELP%" goto :skiphhcsearch @@ -99,7 +99,7 @@ goto end if NOT "%PAPER%" == "" ( set SPHINXOPTS=-D latex_elements.papersize=%PAPER% %SPHINXOPTS% ) -cmd /C %SPHINXBUILD% %SPHINXOPTS% -b%1 -dbuild\doctrees . %BUILDDIR%\%* +cmd /C "%SPHINXBUILD% %SPHINXOPTS% -b%1 -dbuild\doctrees . %BUILDDIR%\%*" if "%1" EQU "htmlhelp" ( cmd /C "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp |