mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Fixes doc/make.bat to properly handle quoted paths. (#3302)
This commit is contained in:
parent
14ce158e3d
commit
d5cd21d75a
1 changed files with 8 additions and 8 deletions
16
Doc/make.bat
16
Doc/make.bat
|
@ -6,18 +6,18 @@ pushd %~dp0
|
||||||
set this=%~n0
|
set this=%~n0
|
||||||
|
|
||||||
call ..\PCBuild\find_python.bat %PYTHON%
|
call ..\PCBuild\find_python.bat %PYTHON%
|
||||||
if "%SPHINXBUILD%" EQU "" if "%PYTHON%" NEQ "" (
|
if not defined SPHINXBUILD if defined PYTHON (
|
||||||
set SPHINXBUILD=%PYTHON%\..\Scripts\sphinx-build.exe
|
%PYTHON% -c "import sphinx" > nul 2> nul
|
||||||
rem Cannot use %SPHINXBUILD% in the same block where we set it
|
if errorlevel 1 (
|
||||||
if not exist "%PYTHON%\..\Scripts\sphinx-build.exe" (
|
|
||||||
echo Installing sphinx with %PYTHON%
|
echo Installing sphinx with %PYTHON%
|
||||||
"%PYTHON%" -m pip install sphinx
|
%PYTHON% -m pip install sphinx
|
||||||
if errorlevel 1 exit /B
|
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 not defined PYTHON set PYTHON=py
|
||||||
if "%SPHINXBUILD%" EQU "" set SPHINXBUILD=sphinx-build
|
if not defined SPHINXBUILD set SPHINXBUILD=sphinx-build
|
||||||
|
|
||||||
if "%1" NEQ "htmlhelp" goto :skiphhcsearch
|
if "%1" NEQ "htmlhelp" goto :skiphhcsearch
|
||||||
if exist "%HTMLHELP%" goto :skiphhcsearch
|
if exist "%HTMLHELP%" goto :skiphhcsearch
|
||||||
|
@ -99,7 +99,7 @@ goto end
|
||||||
if NOT "%PAPER%" == "" (
|
if NOT "%PAPER%" == "" (
|
||||||
set SPHINXOPTS=-D latex_elements.papersize=%PAPER% %SPHINXOPTS%
|
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" (
|
if "%1" EQU "htmlhelp" (
|
||||||
cmd /C "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
|
cmd /C "%HTMLHELP%" build\htmlhelp\python%DISTVERSION:.=%.hhp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue