[go: nahoru, domu]

build: update shebang to python3

This assumes that CQ has enough coverage for these scripts if they are
important.

Derived from https://crrev.com/c/4078643/4/build/android/pylib/symbols/mock_addr2line/mock_addr2line#1

This is made by
$ rg -l '#!.*python$' build | \
  xargs sed -i 's/\(#!.*\)python$/\1python3/'

Bug: 1406153
Change-Id: I3df47e000c690ce8af341ff317539c4faa58e3bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4159758
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1091953}
diff --git a/build/add_rts_filters.py b/build/add_rts_filters.py
index 1a53474a..94297c5 100755
--- a/build/add_rts_filters.py
+++ b/build/add_rts_filters.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2021 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/android/pylib/symbols/mock_addr2line/mock_addr2line b/build/android/pylib/symbols/mock_addr2line/mock_addr2line
index 88b8e98..f4e3d83 100755
--- a/build/android/pylib/symbols/mock_addr2line/mock_addr2line
+++ b/build/android/pylib/symbols/mock_addr2line/mock_addr2line
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2014 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/check_return_value.py b/build/check_return_value.py
index 56b5fe7e..8d785be 100755
--- a/build/check_return_value.py
+++ b/build/check_return_value.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2014 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/clobber.py b/build/clobber.py
index 411bb8d..83e8137 100755
--- a/build/clobber.py
+++ b/build/clobber.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2015 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/compute_build_timestamp.py b/build/compute_build_timestamp.py
index ca1cc44..87e2983 100755
--- a/build/compute_build_timestamp.py
+++ b/build/compute_build_timestamp.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2018 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/config/fuchsia/build_symbol_archive.py b/build/config/fuchsia/build_symbol_archive.py
index 3dcac94..a595ed8 100755
--- a/build/config/fuchsia/build_symbol_archive.py
+++ b/build/config/fuchsia/build_symbol_archive.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright 2018 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
diff --git a/build/config/get_host_byteorder.py b/build/config/get_host_byteorder.py
index 20834a3..194e1b4 100755
--- a/build/config/get_host_byteorder.py
+++ b/build/config/get_host_byteorder.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2017 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/config/linux/pkg-config.py b/build/config/linux/pkg-config.py
index f413363..7e84692 100755
--- a/build/config/linux/pkg-config.py
+++ b/build/config/linux/pkg-config.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2013 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/copy_test_data_ios.py b/build/copy_test_data_ios.py
index bb77f9b0..ae18b44 100755
--- a/build/copy_test_data_ios.py
+++ b/build/copy_test_data_ios.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2012 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/cp.py b/build/cp.py
index 483b274..2bcf55c 100755
--- a/build/cp.py
+++ b/build/cp.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2012 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/detect_host_arch.py b/build/detect_host_arch.py
index 7c7d6d6..bb9b3d8 100755
--- a/build/detect_host_arch.py
+++ b/build/detect_host_arch.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2014 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/dir_exists.py b/build/dir_exists.py
index f95a52d0..da9813f 100755
--- a/build/dir_exists.py
+++ b/build/dir_exists.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2011 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/download_nacl_toolchains.py b/build/download_nacl_toolchains.py
index 8347a391..d22ce2a 100755
--- a/build/download_nacl_toolchains.py
+++ b/build/download_nacl_toolchains.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2012 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/env_dump.py b/build/env_dump.py
index 2474b48..1eaf8dc 100755
--- a/build/env_dump.py
+++ b/build/env_dump.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2013 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/extract_from_cab.py b/build/extract_from_cab.py
index 4c003ba..620da6d 100755
--- a/build/extract_from_cab.py
+++ b/build/extract_from_cab.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2012 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/extract_partition.py b/build/extract_partition.py
index bbe0e70b..319ce8fc 100755
--- a/build/extract_partition.py
+++ b/build/extract_partition.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2019 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/find_depot_tools.py b/build/find_depot_tools.py
index 94985fe..bbf8853a 100755
--- a/build/find_depot_tools.py
+++ b/build/find_depot_tools.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2011 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/fix_gn_headers.py b/build/fix_gn_headers.py
index 7b8086b..012ded6 100755
--- a/build/fix_gn_headers.py
+++ b/build/fix_gn_headers.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2017 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/fuchsia/qemu_target_test.py b/build/fuchsia/qemu_target_test.py
index bdec7992b..8f2846b 100755
--- a/build/fuchsia/qemu_target_test.py
+++ b/build/fuchsia/qemu_target_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2018 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/get_landmines.py b/build/get_landmines.py
index 311f042..af21386 100755
--- a/build/get_landmines.py
+++ b/build/get_landmines.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2013 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/get_symlink_targets.py b/build/get_symlink_targets.py
index 33362c0..850bbae 100755
--- a/build/get_symlink_targets.py
+++ b/build/get_symlink_targets.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2019 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/landmines.py b/build/landmines.py
index 2078b24..844ee38 100755
--- a/build/landmines.py
+++ b/build/landmines.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2012 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/linux/rewrite_dirs.py b/build/linux/rewrite_dirs.py
index aa4f36e..69de1c6 100755
--- a/build/linux/rewrite_dirs.py
+++ b/build/linux/rewrite_dirs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2011 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/linux/strip_binary.py b/build/linux/strip_binary.py
index e77684b..82801c7 100755
--- a/build/linux/strip_binary.py
+++ b/build/linux/strip_binary.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright 2021 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
diff --git a/build/linux/sysroot_scripts/merge-package-lists.py b/build/linux/sysroot_scripts/merge-package-lists.py
index 8e310f2..e2a5a63 100755
--- a/build/linux/sysroot_scripts/merge-package-lists.py
+++ b/build/linux/sysroot_scripts/merge-package-lists.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2016 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/mac/find_sdk.py b/build/mac/find_sdk.py
index 50c1e3c..3c18097f 100755
--- a/build/mac/find_sdk.py
+++ b/build/mac/find_sdk.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2012 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/protoc_java.py b/build/protoc_java.py
index 3c0b313f..2cc56f4 100755
--- a/build/protoc_java.py
+++ b/build/protoc_java.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2012 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/rm.py b/build/rm.py
index 5f4aea10..1f1d233 100755
--- a/build/rm.py
+++ b/build/rm.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2016 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/symlink.py b/build/symlink.py
index 38a6102..44aff0ba 100755
--- a/build/symlink.py
+++ b/build/symlink.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2013 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/toolchain/clang_code_coverage_wrapper.py b/build/toolchain/clang_code_coverage_wrapper.py
index de92ca1..d81b226 100755
--- a/build/toolchain/clang_code_coverage_wrapper.py
+++ b/build/toolchain/clang_code_coverage_wrapper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2018 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/toolchain/gcc_link_wrapper.py b/build/toolchain/gcc_link_wrapper.py
index 60176daa..5c08a7e 100755
--- a/build/toolchain/gcc_link_wrapper.py
+++ b/build/toolchain/gcc_link_wrapper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2015 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/toolchain/gcc_solink_wrapper.py b/build/toolchain/gcc_solink_wrapper.py
index 193f4fe1..03ef042 100755
--- a/build/toolchain/gcc_solink_wrapper.py
+++ b/build/toolchain/gcc_solink_wrapper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2015 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/toolchain/win/ml.py b/build/toolchain/win/ml.py
index 733c10c4..8cc2c9e1 100755
--- a/build/toolchain/win/ml.py
+++ b/build/toolchain/win/ml.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2018 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/toolchain/win/rc/rc.py b/build/toolchain/win/rc/rc.py
index 2e5ec6b..0648c84 100755
--- a/build/toolchain/win/rc/rc.py
+++ b/build/toolchain/win/rc/rc.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2017 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/util/java_action.py b/build/util/java_action.py
index a19e06d..6382dc2 100755
--- a/build/util/java_action.py
+++ b/build/util/java_action.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2015 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/util/lastchange.py b/build/util/lastchange.py
index 2caf945..cb87515d 100755
--- a/build/util/lastchange.py
+++ b/build/util/lastchange.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2012 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/util/lib/common/unittest_util_test.py b/build/util/lib/common/unittest_util_test.py
index 472982b..e775e1a 100755
--- a/build/util/lib/common/unittest_util_test.py
+++ b/build/util/lib/common/unittest_util_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2015 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py
index d426fcd..52a357bc 100755
--- a/build/vs_toolchain.py
+++ b/build/vs_toolchain.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2014 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/win/copy_cdb_to_output.py b/build/win/copy_cdb_to_output.py
index 0076103d..156971a1 100755
--- a/build/win/copy_cdb_to_output.py
+++ b/build/win/copy_cdb_to_output.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2016 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/win/reorder-imports.py b/build/win/reorder-imports.py
index ff40cd6..7dd8e1d 100755
--- a/build/win/reorder-imports.py
+++ b/build/win/reorder-imports.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2014 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/win/use_ansi_codes.py b/build/win/use_ansi_codes.py
index 85469e5..3cf6159 100755
--- a/build/win/use_ansi_codes.py
+++ b/build/win/use_ansi_codes.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2015 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/write_build_date_header.py b/build/write_build_date_header.py
index 3b79417..4929e04 100755
--- a/build/write_build_date_header.py
+++ b/build/write_build_date_header.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2016 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
diff --git a/build/write_buildflag_header.py b/build/write_buildflag_header.py
index 44da8a6..89a07376 100755
--- a/build/write_buildflag_header.py
+++ b/build/write_buildflag_header.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Copyright 2015 The Chromium Authors
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.