From 4f4e76fce524016999d1b5e73ca21b4202d288bb Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Thu, 31 Oct 2013 19:10:56 +0000 Subject: [PATCH] Reapply 231888 "Fixes for python 2.7.5 support." with fixes. Tested to work now with the repro case of bug 313552. "/c" was interpreted by cygwin's bash as a path and was replaced with c:/. :( Using //c seems to be passed through properly. There is probably other escaping problem but this should be good enough at this stage. Ref: http://www.mingw.org/wiki/Posix_path_conversion R=iannucci@chromium.org BUG=241769 BUG=313552 Review URL: https://codereview.chromium.org/50143013 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@232184 0039d316-1c4b-4281-b951-d872f2087c98 --- .gitignore | 2 +- PRESUBMIT.py | 2 +- git-cl | 4 ++-- git-try | 4 ++-- pylint | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 9dd6561b2..7ff607266 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,7 @@ # Ignore locations where third-party tools are placed during bootstrapping. /python_bin -/python_274 +/python275_bin /git_bin /git-1.8.0_bin /svn_bin diff --git a/PRESUBMIT.py b/PRESUBMIT.py index a8e90f354..f75b8e11e 100644 --- a/PRESUBMIT.py +++ b/PRESUBMIT.py @@ -15,7 +15,7 @@ def CommonChecks(input_api, output_api, tests_to_black_list): black_list = list(input_api.DEFAULT_BLACK_LIST) + [ r'^cpplint\.py$', r'^cpplint_chromium\.py$', - r'^python_274[\/\\].+', + r'^python275_bin[\/\\].+', r'^python_bin[\/\\].+', r'^site-packages-py[0-9]\.[0-9][\/\\].+', r'^svn_bin[\/\\].+', diff --git a/git-cl b/git-cl index 0fc4354d5..a1aef0d53 100755 --- a/git-cl +++ b/git-cl @@ -20,8 +20,8 @@ fi # Uncomment this line if you never use gclient. # "$base_dir"/update_depot_tools -if [ -d "$base_dir/python_bin" -a $MINGW = 0 ]; then - PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/python_bin/python.exe" "$base_dir"/git_cl.py "$@" +if [ -e "$base_dir/python.bat" -a $MINGW = 0 ]; then + PYTHONDONTWRITEBYTECODE=1 cmd.exe //c $base_dir\\python.bat $base_dir\\git_cl.py $@ else PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/git_cl.py" "$@" fi diff --git a/git-try b/git-try index 166f66938..e2036de36 100755 --- a/git-try +++ b/git-try @@ -14,8 +14,8 @@ else base_dir=$(dirname "$0") fi -if [ -d "$base_dir/python_bin" -a $MINGW = 0 ]; then - PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/python_bin/python.exe" "$base_dir"/git_try.py "$@" +if [ -e "$base_dir/python.bat" -a $MINGW = 0 ]; then + PYTHONDONTWRITEBYTECODE=1 cmd.exe //c $base_dir\\python.bat $base_dir\\git_try.py $@ else PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/git_try.py" "$@" fi diff --git a/pylint b/pylint index 02cd5a4e0..143f957ff 100755 --- a/pylint +++ b/pylint @@ -12,8 +12,8 @@ base_dir=$(dirname "$0") OUTPUT="$(uname | grep 'MINGW')" MINGW=$? -if [ -d "$base_dir/python_bin" -a $MINGW = 0 ]; then - PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/python_bin/python.exe" "$base_dir"/pylint.py "$@" +if [ -e "$base_dir/python.bat" -a $MINGW = 0 ]; then + PYTHONDONTWRITEBYTECODE=1 cmd.exe //c $base_dir\\python.bat $base_dir\\pylint.py $@ else PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/pylint.py" "$@" fi