Przeglądaj źródła

Make 'compile_single_file' use vpython3

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 <sebmarchand@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Sebastien Marchand 1 rok temu
rodzic
commit
f5dd9dda9e
3 zmienionych plików z 3 dodań i 3 usunięć
  1. 1 1
      compile_single_file
  2. 1 1
      compile_single_file.bat
  3. 1 1
      compile_single_file.py

+ 1 - 1
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" "$@"

+ 1 - 1
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" %*

+ 1 - 1
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)
     ]