@ -116,8 +116,11 @@ goto :END
: PYTHON_CHECK
: PYTHON_CHECK
: : Note: while the variable talks about 2.7.5, we are now installing 2.7.6.
: : Sorry for the confusion. :(
if " %DEPOT_TOOLS_PYTHON_275% " == " 0 " goto : PY26_CHECK
if " %DEPOT_TOOLS_PYTHON_275% " == " 0 " goto : PY26_CHECK
goto : PY275_CHECK
if " %DEPOT_TOOLS_PYTHON_27% " == " 0 " goto : PY26_CHECK
goto : PY27_CHECK
: PY26_CHECK
: PY26_CHECK
@ -127,27 +130,27 @@ set ERRORLEVEL=0
goto : END
goto : END
: PY27 5 _CHECK
: PY27 _CHECK
if not exist " %WIN_TOOLS_ROOT_DIR% \python27 5 _bin" goto : PY27 5 _INSTALL
if not exist " %WIN_TOOLS_ROOT_DIR% \python27 6 _bin" goto : PY27 _INSTALL
if not exist " %WIN_TOOLS_ROOT_DIR% \python.bat " goto : PY27 5 _INSTALL
if not exist " %WIN_TOOLS_ROOT_DIR% \python.bat " goto : PY27 _INSTALL
set ERRORLEVEL = 0
set ERRORLEVEL = 0
goto : END
goto : END
: PY27 5 _INSTALL
: PY27 _INSTALL
echo Installing python 2.7.5 ...
echo Installing python 2.7.6 ...
: : Cleanup python directory if it was existing.
: : Cleanup python directory if it was existing.
if exist " %WIN_TOOLS_ROOT_DIR% \python27 5_bin\." rd /q /s " %WIN_TOOLS_ROOT_DIR% \python275 _bin"
if exist " %WIN_TOOLS_ROOT_DIR% \python27 6_bin\." rd /q /s " %WIN_TOOLS_ROOT_DIR% \python276 _bin"
if exist " %ZIP_DIR% \python27 5.zip" del " %ZIP_DIR% \python275 .zip"
if exist " %ZIP_DIR% \python27 6.zip" del " %ZIP_DIR% \python276 .zip"
echo Fetching from %WIN_TOOLS_ROOT_URL% /third_party/python275 _bin.zip
echo Fetching from %WIN_TOOLS_ROOT_URL% /third_party/python276 _bin.zip
cscript //nologo //e:jscript " %~dp0 get_file.js " %WIN_TOOLS_ROOT_URL% /third_party/python275_bin.zip " %ZIP_DIR% \python275 _bin.zip"
cscript //nologo //e:jscript " %~dp0 get_file.js " %WIN_TOOLS_ROOT_URL% /third_party/python276_bin.zip " %ZIP_DIR% \python276 _bin.zip"
if errorlevel 1 goto : PYTHON_FAIL
if errorlevel 1 goto : PYTHON_FAIL
: : Will create python27 5 _bin\...
: : Will create python27 6 _bin\...
cscript //nologo //e:jscript " %~dp0 unzip.js " " %ZIP_DIR% \python27 5 _bin.zip" " %WIN_TOOLS_ROOT_DIR% "
cscript //nologo //e:jscript " %~dp0 unzip.js " " %ZIP_DIR% \python27 6 _bin.zip" " %WIN_TOOLS_ROOT_DIR% "
: : Create the batch files.
: : Create the batch files.
call copy /y " %~dp0 python27 5 .new.bat" " %WIN_TOOLS_ROOT_DIR% \python.bat " 1 > nul
call copy /y " %~dp0 python27 6 .new.bat" " %WIN_TOOLS_ROOT_DIR% \python.bat " 1 > nul
call copy /y " %~dp0 pylint.new.bat " " %WIN_TOOLS_ROOT_DIR% \pylint.bat " 1 > nul
call copy /y " %~dp0 pylint.new.bat " " %WIN_TOOLS_ROOT_DIR% \pylint.bat " 1 > nul
del " %ZIP_DIR% \python27 5 _bin.zip"
del " %ZIP_DIR% \python27 6 _bin.zip"
set ERRORLEVEL = 0
set ERRORLEVEL = 0
goto : END
goto : END