gclient: Add a GCLIENT_PY3 env var to allow users to execute gclient using Python 3.

Bug: 1008202
Change-Id: I23dd70b72089a09c2a7cdc74e2a63c135a924ebe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1825996
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
This commit is contained in:
Edward Lemur
2019-09-26 21:08:13 +00:00
committed by Commit Bot
parent e4174f483e
commit e656e98831
2 changed files with 15 additions and 2 deletions

View File

@@ -12,4 +12,9 @@ call "%~dp0update_depot_tools.bat" %*
set PATH=%PATH%;%~dp0
:: Defer control.
python "%~dp0gclient.py" %*
IF "%GCLIENT_PY3%" == "1" (
python "%~dp0gclient.py" %*
) ELSE (
:: TODO(1003139): Use vpython3 once vpython3 works on Windows.
python3 "%~dp0gclient.py" %*
)