Skip to content

Commit

Permalink
Use the bundled interpreter instead of passing -vpython-interpreter.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
brianryner8 authored and LUCI CQ committed Aug 3, 2022
1 parent d895d01 commit 8d81365
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
3 changes: 1 addition & 2 deletions vpython
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion vpython.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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" %*
3 changes: 1 addition & 2 deletions vpython3
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 1 addition & 4 deletions vpython3.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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" %*

0 comments on commit 8d81365

Please sign in to comment.