From 8d81365cf05d858e7d34c08c6f3f886136220e37 Mon Sep 17 00:00:00 2001 From: Brian Ryner Date: Wed, 3 Aug 2022 03:03:58 +0000 Subject: [PATCH] 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 Commit-Queue: Brian Ryner Reviewed-by: Gavin Mak --- vpython | 3 +-- vpython.bat | 2 +- vpython3 | 3 +-- vpython3.bat | 5 +---- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/vpython b/vpython index c63795471..cee9f7da8 100755 --- a/vpython +++ b/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 diff --git a/vpython.bat b/vpython.bat index 43f00cf79..c6818714a 100644 --- a/vpython.bat +++ b/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" %* diff --git a/vpython3 b/vpython3 index 91a062517..968eff67f 100755 --- a/vpython3 +++ b/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 diff --git a/vpython3.bat b/vpython3.bat index df1a62a6c..c9f40e76a 100644 --- a/vpython3.bat +++ b/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" %*