From f5dd9dda9ecd56fa429307f724d68cc8929ca173 Mon Sep 17 00:00:00 2001 From: Sebastien Marchand Date: Tue, 16 Jan 2024 19:04:22 +0000 Subject: [PATCH] Make 'compile_single_file' use vpython3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A recent change to autoninja breaks 'compile_single_file' because autoninja expects to be able to find the 'google.auth' package, which is available via vpython3. Change-Id: Ie0c9bc229108daadae27bd85ffc0471d9e7e7fca Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5199126 Commit-Queue: Sébastien Marchand Reviewed-by: Gavin Mak --- compile_single_file | 2 +- compile_single_file.bat | 2 +- compile_single_file.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compile_single_file b/compile_single_file index 33c23c69e..9a6468ba2 100755 --- a/compile_single_file +++ b/compile_single_file @@ -5,4 +5,4 @@ base_dir=$(dirname "$0") -PYTHONDONTWRITEBYTECODE=1 exec python3 -u "$base_dir/compile_single_file.py" "$@" +PYTHONDONTWRITEBYTECODE=1 exec vpython3 -u "$base_dir/compile_single_file.py" "$@" diff --git a/compile_single_file.bat b/compile_single_file.bat index 598f9f221..b85bc6fc0 100644 --- a/compile_single_file.bat +++ b/compile_single_file.bat @@ -8,4 +8,4 @@ setlocal :: standalone, but allow other PATH manipulations to take priority. set PATH=%PATH%;%~dp0 -python3 -u "%~dp0compile_single_file.py" %* +vpython3 -u "%~dp0compile_single_file.py" %* diff --git a/compile_single_file.py b/compile_single_file.py index d1974006d..6ddd84fb5 100644 --- a/compile_single_file.py +++ b/compile_single_file.py @@ -58,7 +58,7 @@ def main(): carets = '^^' command = [ - 'python3', + sys.executable, os.path.join(DEPOT_TOOLS_DIR, 'autoninja.py'), '-C', abs_build_dir, '%s%s' % (src_relpath, carets) ]