瀏覽代碼

Use the bundled interpreter instead of passing -vpython-interpreter.

Once this is rolled out, we will no longer need to bootstrap python(3)
in the vpython wrapper, only vpython itself.

Bug: 1318617
Change-Id: If11b81f19d1d15eda74aae94ddc95c2997148c8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3760318
Reviewed-by: Chenlin Fan <fancl@chromium.org>
Commit-Queue: Brian Ryner <bryner@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Brian Ryner 3 年之前
父節點
當前提交
8d81365cf0
共有 4 個文件被更改,包括 4 次插入9 次删除
  1. 1 2
      vpython
  2. 1 1
      vpython.bat
  3. 1 2
      vpython3
  4. 1 4
      vpython3.bat

+ 1 - 2
vpython

@@ -52,8 +52,7 @@ elif [[ $DEPOT_TOOLS_BOOTSTRAP_PYTHON3 != 0 ]]; then
     source "$base_dir/bootstrap_python3"
     bootstrap_python3
   fi
-  PYTHON_BIN_RELDIR="$base_dir/$(cat "$base_dir/python_bin_reldir.txt" | xargs echo)"
-  exec "$base_dir/.cipd_bin/vpython" -vpython-interpreter  "$PYTHON_BIN_RELDIR/python" "$@"
+  exec "$base_dir/.cipd_bin/vpython" "$@"
 else
   exec "$base_dir/.cipd_bin/vpython" "$@"
 fi

+ 1 - 1
vpython.bat

@@ -7,4 +7,4 @@
 
 call "%~dp0\cipd_bin_setup.bat" > nul 2>&1
 echo %* from %cd% >> "%~dp0\python2_usage.txt"
-"%~dp0\.cipd_bin\vpython.exe" -vpython-interpreter "%~dp0\python.bat" %*
+"%~dp0\.cipd_bin\vpython.exe" %*

+ 1 - 2
vpython3

@@ -48,8 +48,7 @@ elif [[ $DEPOT_TOOLS_BOOTSTRAP_PYTHON3 != 0 ]]; then
     source "$base_dir/bootstrap_python3"
     bootstrap_python3
   fi
-  PYTHON3_BIN_RELDIR="$base_dir/$(cat "$base_dir/python3_bin_reldir.txt" | xargs echo)"
-  exec "$base_dir/.cipd_bin/vpython3" -vpython-interpreter  "$PYTHON3_BIN_RELDIR/python3" "$@"
+  exec "$base_dir/.cipd_bin/vpython3" "$@"
 else
   exec "$base_dir/.cipd_bin/vpython3" "$@"
 fi

+ 1 - 4
vpython3.bat

@@ -3,8 +3,5 @@
 :: Use of this source code is governed by a BSD-style license that can be
 :: found in the LICENSE file.
 
-setlocal
-for /f %%i in (%~dp0python3_bin_reldir.txt) do set PYTHON3_BIN_RELDIR=%%i
-
 call "%~dp0\cipd_bin_setup.bat" > nul 2>&1
-"%~dp0\.cipd_bin\vpython3.exe" -vpython-interpreter "%~dp0\%PYTHON3_BIN_RELDIR%\python3.exe" %*
+"%~dp0\.cipd_bin\vpython3.exe" %*