|
@@ -48,19 +48,17 @@ 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
|
|
|
|
|
|
-# MINGW will equal 0 if we're running on Windows under MinGW.
|
|
|
|
-MINGW=$(uname -s | grep MINGW > /dev/null; echo $?)
|
|
|
|
-
|
|
|
|
-if [[ $GCLIENT_PY3 = 1 ]]; then
|
|
|
|
|
|
+if [[ $PYTHON_DIRECT = 1 ]]; then
|
|
|
|
+ python.exe "$DEPOT_TOOLS\\$SCRIPT" "$@"
|
|
|
|
+elif [[ -e "$DEPOT_TOOLS/python.bat" && $OSTYPE = msys ]]; then
|
|
|
|
+ cmd.exe //c "$DEPOT_TOOLS\\vpython.bat" "$DEPOT_TOOLS\\$SCRIPT" "$@"
|
|
|
|
+elif [[ $GCLIENT_PY3 = 1 ]]; then
|
|
# Explicitly run on Python 3
|
|
# Explicitly run on Python 3
|
|
vpython3 "$DEPOT_TOOLS/$SCRIPT" "$@"
|
|
vpython3 "$DEPOT_TOOLS/$SCRIPT" "$@"
|
|
elif [[ $GCLIENT_PY3 = 0 ]]; then
|
|
elif [[ $GCLIENT_PY3 = 0 ]]; then
|
|
# Explicitly run on Python 2
|
|
# Explicitly run on Python 2
|
|
vpython "$DEPOT_TOOLS/$SCRIPT" "$@"
|
|
vpython "$DEPOT_TOOLS/$SCRIPT" "$@"
|
|
-elif [[ $MINGW = 0 ]]; then
|
|
|
|
- # Run on Python 2 on Windows for now, allows default to be flipped.
|
|
|
|
- vpython "$DEPOT_TOOLS/$SCRIPT" "$@"
|
|
|
|
else
|
|
else
|
|
- # Run on Python 3, allows default to be flipped.
|
|
|
|
- vpython3 "$DEPOT_TOOLS/$SCRIPT" "$@"
|
|
|
|
|
|
+ # Run on Python 2 for now, allows default to be flipped.
|
|
|
|
+ vpython "$DEPOT_TOOLS/$SCRIPT" "$@"
|
|
fi
|
|
fi
|