From 181ddcec35e84383b091638d0522b9b78533dcea Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Fri, 15 Nov 2013 18:39:43 +0000 Subject: [PATCH] Update the python auto-install on Windows to 2.7.6. 2.7.5 has bug http://bugs.python.org/issue17998 in re package that is affecting the chromium team so it can't be used. The bug is fixed in 2.7.6. This update still respects DEPOT_TOOLS_PYTHON_275=0. Since the name doesn't represent what is being installed, it also respects DEPOT_TOOLS_PYTHON_27=0. R=iannucci@chromium.org BUG=241769 Review URL: https://codereview.chromium.org/73013003 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@235384 0039d316-1c4b-4281-b951-d872f2087c98 --- .../{python275.new.bat => python276.new.bat} | 4 +-- bootstrap/win/win_tools.bat | 31 ++++++++++--------- 2 files changed, 19 insertions(+), 16 deletions(-) rename bootstrap/win/{python275.new.bat => python276.new.bat} (63%) diff --git a/bootstrap/win/python275.new.bat b/bootstrap/win/python276.new.bat similarity index 63% rename from bootstrap/win/python275.new.bat rename to bootstrap/win/python276.new.bat index f57dd6c72..bbd40e976 100644 --- a/bootstrap/win/python275.new.bat +++ b/bootstrap/win/python276.new.bat @@ -4,5 +4,5 @@ :: found in the LICENSE file. setlocal -set PATH=%~dp0python275_bin;%~dp0python275_bin\Scripts;%PATH% -"%~dp0python275_bin\python.exe" %* +set PATH=%~dp0python276_bin;%~dp0python276_bin\Scripts;%PATH% +"%~dp0python276_bin\python.exe" %* diff --git a/bootstrap/win/win_tools.bat b/bootstrap/win/win_tools.bat index d5078022e..2d478f550 100644 --- a/bootstrap/win/win_tools.bat +++ b/bootstrap/win/win_tools.bat @@ -116,8 +116,11 @@ goto :END :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 -goto :PY275_CHECK +if "%DEPOT_TOOLS_PYTHON_27%" == "0" goto :PY26_CHECK +goto :PY27_CHECK :PY26_CHECK @@ -127,27 +130,27 @@ set ERRORLEVEL=0 goto :END -:PY275_CHECK -if not exist "%WIN_TOOLS_ROOT_DIR%\python275_bin" goto :PY275_INSTALL -if not exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :PY275_INSTALL +:PY27_CHECK +if not exist "%WIN_TOOLS_ROOT_DIR%\python276_bin" goto :PY27_INSTALL +if not exist "%WIN_TOOLS_ROOT_DIR%\python.bat" goto :PY27_INSTALL set ERRORLEVEL=0 goto :END -:PY275_INSTALL -echo Installing python 2.7.5... +:PY27_INSTALL +echo Installing python 2.7.6... :: Cleanup python directory if it was existing. -if exist "%WIN_TOOLS_ROOT_DIR%\python275_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\python275_bin" -if exist "%ZIP_DIR%\python275.zip" del "%ZIP_DIR%\python275.zip" -echo Fetching from %WIN_TOOLS_ROOT_URL%/third_party/python275_bin.zip -cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party/python275_bin.zip "%ZIP_DIR%\python275_bin.zip" +if exist "%WIN_TOOLS_ROOT_DIR%\python276_bin\." rd /q /s "%WIN_TOOLS_ROOT_DIR%\python276_bin" +if exist "%ZIP_DIR%\python276.zip" del "%ZIP_DIR%\python276.zip" +echo Fetching from %WIN_TOOLS_ROOT_URL%/third_party/python276_bin.zip +cscript //nologo //e:jscript "%~dp0get_file.js" %WIN_TOOLS_ROOT_URL%/third_party/python276_bin.zip "%ZIP_DIR%\python276_bin.zip" if errorlevel 1 goto :PYTHON_FAIL -:: Will create python275_bin\... -cscript //nologo //e:jscript "%~dp0unzip.js" "%ZIP_DIR%\python275_bin.zip" "%WIN_TOOLS_ROOT_DIR%" +:: Will create python276_bin\... +cscript //nologo //e:jscript "%~dp0unzip.js" "%ZIP_DIR%\python276_bin.zip" "%WIN_TOOLS_ROOT_DIR%" :: Create the batch files. -call copy /y "%~dp0python275.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul +call copy /y "%~dp0python276.new.bat" "%WIN_TOOLS_ROOT_DIR%\python.bat" 1>nul call copy /y "%~dp0pylint.new.bat" "%WIN_TOOLS_ROOT_DIR%\pylint.bat" 1>nul -del "%ZIP_DIR%\python275_bin.zip" +del "%ZIP_DIR%\python276_bin.zip" set ERRORLEVEL=0 goto :END