mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Fixes for python 2.7.5 support.
Fix the git-* wrapper scripts, PRESUBMIT.py and .gitignore. The previous python wrapping scripts assumed python_bin\python.exe. This CL modifies the wrapping scripts to use python.bat. This requires some quoting magic and explicitly defer to cmd.exe. This may break some cases where double quotes are used as arguments. We can't do miracles on Windows. R=iannucci@chromium.org BUG= Review URL: https://codereview.chromium.org/50563008 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@231888 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
# Ignore locations where third-party tools are placed during bootstrapping.
|
# Ignore locations where third-party tools are placed during bootstrapping.
|
||||||
/python_bin
|
/python_bin
|
||||||
/python_274
|
/python275_bin
|
||||||
/git_bin
|
/git_bin
|
||||||
/git-1.8.0_bin
|
/git-1.8.0_bin
|
||||||
/svn_bin
|
/svn_bin
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ def CommonChecks(input_api, output_api, tests_to_black_list):
|
|||||||
black_list = list(input_api.DEFAULT_BLACK_LIST) + [
|
black_list = list(input_api.DEFAULT_BLACK_LIST) + [
|
||||||
r'^cpplint\.py$',
|
r'^cpplint\.py$',
|
||||||
r'^cpplint_chromium\.py$',
|
r'^cpplint_chromium\.py$',
|
||||||
r'^python_274[\/\\].+',
|
r'^python275_bin[\/\\].+',
|
||||||
r'^python_bin[\/\\].+',
|
r'^python_bin[\/\\].+',
|
||||||
r'^site-packages-py[0-9]\.[0-9][\/\\].+',
|
r'^site-packages-py[0-9]\.[0-9][\/\\].+',
|
||||||
r'^svn_bin[\/\\].+',
|
r'^svn_bin[\/\\].+',
|
||||||
|
|||||||
4
git-cl
4
git-cl
@@ -20,8 +20,8 @@ fi
|
|||||||
# Uncomment this line if you never use gclient.
|
# Uncomment this line if you never use gclient.
|
||||||
# "$base_dir"/update_depot_tools
|
# "$base_dir"/update_depot_tools
|
||||||
|
|
||||||
if [ -d "$base_dir/python_bin" -a $MINGW = 0 ]; then
|
if [ -e "$base_dir/python.bat" -a $MINGW = 0 ]; then
|
||||||
PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/python_bin/python.exe" "$base_dir"/git_cl.py "$@"
|
PYTHONDONTWRITEBYTECODE=1 cmd.exe /c "$base_dir/python.bat $base_dir/git_cl.py $@"
|
||||||
else
|
else
|
||||||
PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/git_cl.py" "$@"
|
PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/git_cl.py" "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
4
git-try
4
git-try
@@ -14,8 +14,8 @@ else
|
|||||||
base_dir=$(dirname "$0")
|
base_dir=$(dirname "$0")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$base_dir/python_bin" -a $MINGW = 0 ]; then
|
if [ -e "$base_dir/python.bat" -a $MINGW = 0 ]; then
|
||||||
PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/python_bin/python.exe" "$base_dir"/git_try.py "$@"
|
PYTHONDONTWRITEBYTECODE=1 cmd.exe /c "$base_dir/python.bat $base_dir/git_try.py $@"
|
||||||
else
|
else
|
||||||
PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/git_try.py" "$@"
|
PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/git_try.py" "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
4
pylint
4
pylint
@@ -12,8 +12,8 @@ base_dir=$(dirname "$0")
|
|||||||
OUTPUT="$(uname | grep 'MINGW')"
|
OUTPUT="$(uname | grep 'MINGW')"
|
||||||
MINGW=$?
|
MINGW=$?
|
||||||
|
|
||||||
if [ -d "$base_dir/python_bin" -a $MINGW = 0 ]; then
|
if [ -e "$base_dir/python.bat" -a $MINGW = 0 ]; then
|
||||||
PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/python_bin/python.exe" "$base_dir"/pylint.py "$@"
|
PYTHONDONTWRITEBYTECODE=1 cmd.exe /c "$base_dir/python.bat $base_dir/pylint.py $@"
|
||||||
else
|
else
|
||||||
PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/pylint.py" "$@"
|
PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/pylint.py" "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user