Commit c440b23d authored by Edward Lesmes's avatar Edward Lesmes Committed by LUCI CQ

depot_tools: Execute commands using Python 2 on Windows when GCLIENT_PY3=0.


Change-Id: Ib51acc5671c7b60219f64bcb73a70f85a51779a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2140817Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
parent 48c5c9c5
......@@ -13,7 +13,12 @@ set PATH=%PATH%;%~dp0
:: Defer control.
IF "%GCLIENT_PY3%" == "1" (
vpython3 "%~dp0\fetch.py" %*
:: Explicitly run on Python 3
call vpython3 "%~dp0\fetch.py" %*
) ELSE IF "%GCLIENT_PY3%" == "0" (
:: Explicitly run on Python 2
call vpython "%~dp0\fetch.py" %*
) ELSE (
vpython "%~dp0\fetch.py" %*
:: Run on Python 2, allows default to be flipped.
call vpython "%~dp0\fetch.py" %*
)
......@@ -17,8 +17,12 @@ set PATH=%PATH%;%~dp0
:: Defer control.
IF "%GCLIENT_PY3%" == "1" (
:: TODO(1003139): Use vpython3 once vpython3 works on Windows.
call python3 "%~dp0gclient.py" %*
:: Explicitly run on Python 3
call vpython3 "%~dp0gclient.py" %*
) ELSE IF "%GCLIENT_PY3%" == "0" (
:: Explicitly run on Python 2
call vpython "%~dp0gclient.py" %*
) ELSE (
call python "%~dp0gclient.py" %*
:: Run on Python 2, allows default to be flipped.
call vpython "%~dp0gclient.py" %*
)
......@@ -9,4 +9,13 @@ setlocal
set PATH=%PATH%;%~dp0
:: Defer control.
python "%~dp0\roll_dep.py" %*
IF "%GCLIENT_PY3%" == "1" (
:: Explicitly run on Python 3
call vpython3 "%~dp0\roll_dep.py" %*
) ELSE IF "%GCLIENT_PY3%" == "0" (
:: Explicitly run on Python 2
call vpython "%~dp0\roll_dep.py" %*
) ELSE (
:: Run on Python 2, allows default to be flipped.
call vpython "%~dp0\roll_dep.py" %*
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment