Commit c621315d authored by Josip Sokcevic's avatar Josip Sokcevic Committed by LUCI CQ

Make Python 3 default on Windows

Users can still set GCLIENT_PY3=0 to use Python 2.

R=ehmaldonado@chromium.org

Change-Id: Ic7657a091bfe3b9c426ab36063b106aadf2d1c84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2161266
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: 's avatarEdward Lesmes <ehmaldonado@chromium.org>
parent 64c1faf0
......@@ -15,9 +15,6 @@ if [[ $GCLIENT_PY3 == 1 ]]; then
elif [[ $GCLIENT_PY3 == 0 ]]; then
# Explicitly run on Python 2
PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/fetch.py" "$@"
elif [[ $(uname -s) = MINGW* || $(uname -s) = CYGWIN* ]]; then
# Run on Python 2 on Windows for now, allows default to be flipped.
PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/fetch.py" "$@"
else
# Run on Python 3, allows default to be flipped.
PYTHONDONTWRITEBYTECODE=1 exec vpython3 "$base_dir/fetch.py" "$@"
......
......@@ -19,6 +19,6 @@ IF "%GCLIENT_PY3%" == "1" (
:: Explicitly run on Python 2
call vpython "%~dp0\fetch.py" %*
) ELSE (
:: Run on Python 2, allows default to be flipped.
call vpython "%~dp0\fetch.py" %*
:: Run on Python 3, allows default to be flipped.
call vpython3 "%~dp0\fetch.py" %*
)
......@@ -32,9 +32,6 @@ if [[ $GCLIENT_PY3 == 1 ]]; then
elif [[ $GCLIENT_PY3 == 0 ]]; then
# Explicitly run on Python 2
PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/gclient.py" "$@"
elif [[ $(uname -s) = MINGW* || $(uname -s) = CYGWIN* ]]; then
# Run on Python 2 on Windows for now, allows default to be flipped.
PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/gclient.py" "$@"
else
# Run on Python 3, allows default to be flipped.
PYTHONDONTWRITEBYTECODE=1 exec vpython3 "$base_dir/gclient.py" "$@"
......
......@@ -23,6 +23,6 @@ IF "%GCLIENT_PY3%" == "1" (
:: Explicitly run on Python 2
call vpython "%~dp0gclient.py" %*
) ELSE (
:: Run on Python 2, allows default to be flipped.
call vpython "%~dp0gclient.py" %*
:: Run on Python 3, allows default to be flipped.
call vpython3 "%~dp0gclient.py" %*
)
......@@ -54,9 +54,6 @@ if [[ $GCLIENT_PY3 = 1 ]]; then
elif [[ $GCLIENT_PY3 = 0 ]]; then
# Explicitly run on Python 2
vpython "$DEPOT_TOOLS/$SCRIPT" "$@"
elif [[ $(uname -s) = MINGW* || $(uname -s) = CYGWIN* ]]; then
# Run on Python 2 on Windows for now, allows default to be flipped.
vpython "$DEPOT_TOOLS/$SCRIPT" "$@"
else
# Run on Python 3, allows default to be flipped.
vpython3 "$DEPOT_TOOLS/$SCRIPT" "$@"
......
......@@ -15,9 +15,6 @@ if [[ $GCLIENT_PY3 = 1 ]]; then
elif [[ $GCLIENT_PY3 = 0 ]]; then
# Explicitly run on Python 2
PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/roll_dep.py" "$@"
elif [[ $(uname -s) = MINGW* || $(uname -s) = CYGWIN* ]]; then
# Run on Python 2 on Windows for now, allows default to be flipped.
PYTHONDONTWRITEBYTECODE=1 exec vpython "$base_dir/roll_dep.py" "$@"
else
# Run on Python 2 for now, allows default to be flipped.
PYTHONDONTWRITEBYTECODE=1 exec vpython3 "$base_dir/roll_dep.py" "$@"
......
......@@ -16,6 +16,6 @@ IF "%GCLIENT_PY3%" == "1" (
:: 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" %*
:: Run on Python 3, allows default to be flipped.
call vpython3 "%~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