mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 02:31:29 +00:00
[py2] Drop envvar to run scripts with py2
R=aravindvasudev@google.com Change-Id: I4c2c8265296f8fa1c2ce9a1e4a0b31d1f1dd39f1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4522398 Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com> Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
This commit is contained in:
11
fetch
11
fetch
@@ -9,13 +9,4 @@ base_dir=$(dirname "$0")
|
|||||||
# standalone, but allow other PATH manipulations to take priority.
|
# standalone, but allow other PATH manipulations to take priority.
|
||||||
PATH=$PATH:$base_dir
|
PATH=$PATH:$base_dir
|
||||||
|
|
||||||
if [[ $GCLIENT_PY3 == 1 ]]; then
|
PYTHONDONTWRITEBYTECODE=1 exec vpython3 "$base_dir/fetch.py" "$@"
|
||||||
# Explicitly run on Python 3
|
|
||||||
PYTHONDONTWRITEBYTECODE=1 exec vpython3 "$base_dir/fetch.py" "$@"
|
|
||||||
elif [[ $GCLIENT_PY3 == 0 ]]; then
|
|
||||||
# Explicitly run on Python 2
|
|
||||||
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" "$@"
|
|
||||||
fi
|
|
||||||
|
|||||||
11
fetch.bat
11
fetch.bat
@@ -16,13 +16,4 @@ IF %ERRORLEVEL% NEQ 0 (
|
|||||||
set PATH=%PATH%;%~dp0
|
set PATH=%PATH%;%~dp0
|
||||||
|
|
||||||
:: Defer control.
|
:: Defer control.
|
||||||
IF "%GCLIENT_PY3%" == "1" (
|
call 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 (
|
|
||||||
:: Run on Python 3, allows default to be flipped.
|
|
||||||
call vpython3 "%~dp0\fetch.py" %*
|
|
||||||
)
|
|
||||||
|
|||||||
11
gclient
11
gclient
@@ -26,13 +26,4 @@ fi
|
|||||||
# standalone, but allow other PATH manipulations to take priority.
|
# standalone, but allow other PATH manipulations to take priority.
|
||||||
PATH=$PATH:$base_dir
|
PATH=$PATH:$base_dir
|
||||||
|
|
||||||
if [[ $GCLIENT_PY3 == 1 ]]; then
|
PYTHONDONTWRITEBYTECODE=1 exec vpython3 "$base_dir/gclient.py" "$@"
|
||||||
# Explicitly run on Python 3
|
|
||||||
PYTHONDONTWRITEBYTECODE=1 exec vpython3 "$base_dir/gclient.py" "$@"
|
|
||||||
elif [[ $GCLIENT_PY3 == 0 ]]; then
|
|
||||||
# Explicitly run on Python 2
|
|
||||||
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" "$@"
|
|
||||||
fi
|
|
||||||
|
|||||||
11
gclient.bat
11
gclient.bat
@@ -20,13 +20,4 @@ IF %ERRORLEVEL% NEQ 0 (
|
|||||||
set PATH=%PATH%;%~dp0
|
set PATH=%PATH%;%~dp0
|
||||||
|
|
||||||
:: Defer control.
|
:: Defer control.
|
||||||
IF "%GCLIENT_PY3%" == "1" (
|
call vpython3 "%~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 (
|
|
||||||
:: Run on Python 3, allows default to be flipped.
|
|
||||||
call vpython3 "%~dp0gclient.py" %*
|
|
||||||
)
|
|
||||||
|
|||||||
@@ -48,13 +48,4 @@ SCRIPT="${SCRIPT-${BASENAME//-/_}.py}"
|
|||||||
# standalone, but allow other PATH manipulations to take priority.
|
# standalone, but allow other PATH manipulations to take priority.
|
||||||
PATH=$PATH:$DEPOT_TOOLS
|
PATH=$PATH:$DEPOT_TOOLS
|
||||||
|
|
||||||
if [[ $GCLIENT_PY3 = 1 ]]; then
|
vpython3 "$DEPOT_TOOLS/$SCRIPT" "$@"
|
||||||
# Explicitly run on Python 3
|
|
||||||
vpython3 "$DEPOT_TOOLS/$SCRIPT" "$@"
|
|
||||||
elif [[ $GCLIENT_PY3 = 0 ]]; then
|
|
||||||
# Explicitly run on Python 2
|
|
||||||
vpython "$DEPOT_TOOLS/$SCRIPT" "$@"
|
|
||||||
else
|
|
||||||
# Run on Python 3, allows default to be flipped.
|
|
||||||
vpython3 "$DEPOT_TOOLS/$SCRIPT" "$@"
|
|
||||||
fi
|
|
||||||
|
|||||||
11
roll-dep
11
roll-dep
@@ -9,13 +9,4 @@ base_dir=$(dirname "$0")
|
|||||||
# standalone, but allow other PATH manipulations to take priority.
|
# standalone, but allow other PATH manipulations to take priority.
|
||||||
PATH=$PATH:$base_dir
|
PATH=$PATH:$base_dir
|
||||||
|
|
||||||
if [[ $GCLIENT_PY3 = 1 ]]; then
|
PYTHONDONTWRITEBYTECODE=1 exec vpython3 "$base_dir/roll_dep.py" "$@"
|
||||||
# Explicitly run on Python 3
|
|
||||||
PYTHONDONTWRITEBYTECODE=1 exec vpython3 "$base_dir/roll_dep.py" "$@"
|
|
||||||
elif [[ $GCLIENT_PY3 = 0 ]]; then
|
|
||||||
# Explicitly run on Python 2
|
|
||||||
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" "$@"
|
|
||||||
fi
|
|
||||||
|
|||||||
11
roll-dep.bat
11
roll-dep.bat
@@ -9,13 +9,4 @@ setlocal
|
|||||||
set PATH=%PATH%;%~dp0
|
set PATH=%PATH%;%~dp0
|
||||||
|
|
||||||
:: Defer control.
|
:: Defer control.
|
||||||
IF "%GCLIENT_PY3%" == "1" (
|
call vpython3 "%~dp0\roll_dep.py" %*
|
||||||
:: 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 3, allows default to be flipped.
|
|
||||||
call vpython3 "%~dp0\roll_dep.py" %*
|
|
||||||
)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user