From 9345bee86055b1ea6e17bd51a634a123459b0d8b Mon Sep 17 00:00:00 2001 From: Takuto Ikuta Date: Fri, 26 Nov 2021 21:06:40 +0900 Subject: [PATCH] DEPS: use python3 Bug: chromium:1208028 Change-Id: I1117855556e4a9e7cbaf54764c8a23c5b8581ded Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/239160 Auto-Submit: Takuto Ikuta Reviewed-by: Jeremy Leconte Reviewed-by: Mirko Bonadei Commit-Queue: Mirko Bonadei Cr-Commit-Position: refs/heads/main@{#35426} --- .vpython3 | 8 ++++---- DEPS | 38 +++++++++++++++++------------------ tools_webrtc/get_landmines.py | 34 +++++++++++++++++-------------- 3 files changed, 42 insertions(+), 38 deletions(-) diff --git a/.vpython3 b/.vpython3 index 17de513da7..3d2a8e40c2 100644 --- a/.vpython3 +++ b/.vpython3 @@ -27,8 +27,8 @@ python_version: "3.8" # Used by: # third_party/catapult wheel: < - name: "infra/python/wheels/psutil/${platform}_${py_python}_${py_abi}" - version: "version:5.2.2" + name: "infra/python/wheels/psutil/${vpython_platform}" + version: "version:5.8.0.chromium.2" > # Used by tools_webrtc/perf/webrtc_dashboard_upload.py. @@ -40,8 +40,8 @@ wheel: < # Used by: # build/toolchain/win wheel: < - name: "infra/python/wheels/pypiwin32/${vpython_platform}" - version: "version:219" + name: "infra/python/wheels/pywin32/${vpython_platform}" + version: "version:300" match_tag: < platform: "win32" > diff --git a/DEPS b/DEPS index 3947e7e050..dc9ac97e62 100644 --- a/DEPS +++ b/DEPS @@ -2408,7 +2408,7 @@ hooks = [ 'name': 'landmines', 'pattern': '.', 'action': [ - 'python', + 'python3', 'src/build/landmines.py', '--landmine-scripts', 'src/tools_webrtc/get_landmines.py', @@ -2422,7 +2422,7 @@ hooks = [ 'name': 'disable_depot_tools_selfupdate', 'pattern': '.', 'action': [ - 'python', + 'python3', 'src/third_party/depot_tools/update_depot_tools_toggle.py', '--disable', ], @@ -2431,14 +2431,14 @@ hooks = [ 'name': 'sysroot_arm', 'pattern': '.', 'condition': 'checkout_linux and checkout_arm', - 'action': ['python', 'src/build/linux/sysroot_scripts/install-sysroot.py', + 'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py', '--arch=arm'], }, { 'name': 'sysroot_arm64', 'pattern': '.', 'condition': 'checkout_linux and checkout_arm64', - 'action': ['python', 'src/build/linux/sysroot_scripts/install-sysroot.py', + 'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py', '--arch=arm64'], }, { @@ -2446,7 +2446,7 @@ hooks = [ 'pattern': '.', 'condition': 'checkout_linux and (checkout_x86 or checkout_x64)', # TODO(mbonadei): change to --arch=x86. - 'action': ['python', 'src/build/linux/sysroot_scripts/install-sysroot.py', + 'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py', '--arch=i386'], }, { @@ -2454,7 +2454,7 @@ hooks = [ 'pattern': '.', 'condition': 'checkout_linux and checkout_mips', # TODO(mbonadei): change to --arch=mips. - 'action': ['python', 'src/build/linux/sysroot_scripts/install-sysroot.py', + 'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py', '--arch=mipsel'], }, { @@ -2462,7 +2462,7 @@ hooks = [ 'pattern': '.', 'condition': 'checkout_linux and checkout_x64', # TODO(mbonadei): change to --arch=x64. - 'action': ['python', 'src/build/linux/sysroot_scripts/install-sysroot.py', + 'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py', '--arch=amd64'], }, { @@ -2470,7 +2470,7 @@ hooks = [ 'name': 'ciopfs_linux', 'pattern': '.', 'condition': 'checkout_win and host_os == "linux"', - 'action': [ 'python', + 'action': [ 'python3', 'src/third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--no_auth', @@ -2483,14 +2483,14 @@ hooks = [ 'name': 'win_toolchain', 'pattern': '.', 'condition': 'checkout_win', - 'action': ['python', 'src/build/vs_toolchain.py', 'update', '--force'], + 'action': ['python3', 'src/build/vs_toolchain.py', 'update', '--force'], }, { # Update the Mac toolchain if necessary. 'name': 'mac_toolchain', 'pattern': '.', 'condition': 'checkout_mac', - 'action': ['python', 'src/build/mac_toolchain.py'], + 'action': ['python3', 'src/build/mac_toolchain.py'], }, { # Note: On Win, this should run after win_toolchain, as it may use it. @@ -2502,7 +2502,7 @@ hooks = [ # Update LASTCHANGE. 'name': 'lastchange', 'pattern': '.', - 'action': ['python', 'src/build/util/lastchange.py', + 'action': ['python3', 'src/build/util/lastchange.py', '-o', 'src/build/util/LASTCHANGE'], }, # Pull clang-format binaries using checked-in hashes. @@ -2547,7 +2547,7 @@ hooks = [ 'name': 'rc_win', 'pattern': '.', 'condition': 'checkout_win and host_os == "win"', - 'action': [ 'python', + 'action': [ 'python3', 'src/third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--no_auth', @@ -2559,7 +2559,7 @@ hooks = [ 'name': 'rc_mac', 'pattern': '.', 'condition': 'checkout_win and host_os == "mac"', - 'action': [ 'python', + 'action': [ 'python3', 'src/third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--no_auth', @@ -2571,7 +2571,7 @@ hooks = [ 'name': 'rc_linux', 'pattern': '.', 'condition': 'checkout_win and host_os == "linux"', - 'action': [ 'python', + 'action': [ 'python3', 'src/third_party/depot_tools/download_from_google_storage.py', '--no_resume', '--no_auth', @@ -2594,7 +2594,7 @@ hooks = [ 'name': 'msan_chained_origins', 'pattern': '.', 'condition': 'checkout_instrumented_libraries', - 'action': [ 'python', + 'action': [ 'python3', 'src/third_party/depot_tools/download_from_google_storage.py', "--no_resume", "--no_auth", @@ -2606,7 +2606,7 @@ hooks = [ 'name': 'msan_no_origins', 'pattern': '.', 'condition': 'checkout_instrumented_libraries', - 'action': [ 'python', + 'action': [ 'python3', 'src/third_party/depot_tools/download_from_google_storage.py', "--no_resume", "--no_auth", @@ -2630,7 +2630,7 @@ hooks = [ 'name': 'Generate component metadata for tests', 'pattern': '.', 'action': [ - 'vpython', + 'vpython3', 'src/testing/generate_location_tags.py', '--out', 'src/testing/location_tags.json', @@ -2640,8 +2640,8 @@ hooks = [ { 'name': 'vpython_common', 'pattern': '.', - 'action': [ 'vpython', - '-vpython-spec', 'src/.vpython', + 'action': [ 'vpython3', + '-vpython-spec', 'src/.vpython3', '-vpython-tool', 'install', ], }, diff --git a/tools_webrtc/get_landmines.py b/tools_webrtc/get_landmines.py index 764f053f2a..b80a360f7c 100755 --- a/tools_webrtc/get_landmines.py +++ b/tools_webrtc/get_landmines.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license @@ -11,6 +11,9 @@ This file emits the list of reasons why a particular build needs to be clobbered (or a list of 'landmines'). """ +from __future__ import absolute_import +from __future__ import print_function + import os import sys @@ -27,35 +30,36 @@ def print_landmines(): # pylint: disable=invalid-name ALL LANDMINES ARE EMITTED FROM HERE. """ # DO NOT add landmines as part of a regular CL. Landmines are a last-effort - # bandaid fix if a CL that got landed has a build dependency bug and all bots - # need to be cleaned up. If you're writing a new CL that causes build + # bandaid fix if a CL that got landed has a build dependency bug and all + # bots need to be cleaned up. If you're writing a new CL that causes build # dependency problems, fix the dependency problems instead of adding a # landmine. # See the Chromium version in src/build/get_landmines.py for usage examples. - print 'Clobber to remove out/{Debug,Release}/args.gn (webrtc:5070)' + print('Clobber to remove out/{Debug,Release}/args.gn (webrtc:5070)') if host_os() == 'win': - print 'Clobber to resolve some issues with corrupt .pdb files on bots.' - print 'Clobber due to corrupt .pdb files (after #14623)' - print 'Clobber due to Win 64-bit Debug linking error (crbug.com/668961)' + print('Clobber to resolve some issues with corrupt .pdb files on bots.') + print('Clobber due to corrupt .pdb files (after #14623)') + print( + 'Clobber due to Win 64-bit Debug linking error (crbug.com/668961)') print('Clobber due to Win Clang Debug linking errors in ' 'https://codereview.webrtc.org/2786603002') print('Clobber due to Win Debug linking errors in ' 'https://codereview.webrtc.org/2832063003/') - print 'Clobber win x86 bots (issues with isolated files).' + print('Clobber win x86 bots (issues with isolated files).') if host_os() == 'mac': - print 'Clobber due to iOS compile errors (crbug.com/694721)' - print 'Clobber to unblock https://codereview.webrtc.org/2709573003' + print('Clobber due to iOS compile errors (crbug.com/694721)') + print('Clobber to unblock https://codereview.webrtc.org/2709573003') print('Clobber to fix https://codereview.webrtc.org/2709573003 after ' 'landing') print('Clobber to fix https://codereview.webrtc.org/2767383005 before' 'landing (changing rtc_executable -> rtc_test on iOS)') print('Clobber to fix https://codereview.webrtc.org/2767383005 before' 'landing (changing rtc_executable -> rtc_test on iOS)') - print 'Another landmine for low_bandwidth_audio_test (webrtc:7430)' - print 'Clobber to change neteq_rtpplay type to executable' - print 'Clobber to remove .xctest files.' - print 'Clobber to remove .xctest files (take 2).' - print 'Switching rtc_executable to rtc_test' + print('Another landmine for low_bandwidth_audio_test (webrtc:7430)') + print('Clobber to change neteq_rtpplay type to executable') + print('Clobber to remove .xctest files.') + print('Clobber to remove .xctest files (take 2).') + print('Switching rtc_executable to rtc_test') def main():