depot_tools: Run Python scripts using vpython (Part 1)

Tbr: iannucci@chromium.org
Bug: 984182
Change-Id: If36722e190d305f89d63dce91d0a600ddc34ebe3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1748589
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This commit is contained in:
Edward Lemur
2019-08-12 17:56:58 +00:00
committed by Commit Bot
parent 192e8a67cf
commit d6186f9936
22 changed files with 27 additions and 25 deletions

View File

@@ -15,9 +15,9 @@ gclient_spec="solutions=[{'name':'src','url':None,'deps_file':'.DEPS.git'}]"
kernel_name=$(uname -s)
if [ "${kernel_name:0:5}" = "MINGW" ]; then
dir="${0%\\*}"
cmd "/C ${dir}\\python.bat ${dir}\\gclient.py runhooks --spec=$gclient_spec"
${dir}\\vpython "${dir}\\gclient.py" "runhooks" "--spec=$gclient_spec"
else
dir="$(dirname $0)"
PYTHONDONTWRITEBYTECODE=1 exec python "$dir/gclient.py" runhooks --spec="$gclient_spec"
PYTHONDONTWRITEBYTECODE=1 exec $dir/vpython "$dir/gclient.py" runhooks --spec="$gclient_spec"
fi
exit $?