diff --git a/build/copy_info_plist.py b/build/copy_info_plist.py index a87e1a8c98867..031975b37a8b4 100644 --- a/build/copy_info_plist.py +++ b/build/copy_info_plist.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/build/dart/tools/dart_package_name.py b/build/dart/tools/dart_package_name.py index 255ef5be7a13a..db8c9e93193ed 100755 --- a/build/dart/tools/dart_package_name.py +++ b/build/dart/tools/dart_package_name.py @@ -1,4 +1,5 @@ -#!/usr/bin/python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/build/dart/tools/dart_pkg.py b/build/dart/tools/dart_pkg.py index 18d2e6951faf8..15c29cd7bace9 100755 --- a/build/dart/tools/dart_pkg.py +++ b/build/dart/tools/dart_pkg.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/build/generate_coverage.py b/build/generate_coverage.py index bf675eca09c93..ae7099f47a3fe 100755 --- a/build/generate_coverage.py +++ b/build/generate_coverage.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/build/git_revision.py b/build/git_revision.py index 5ee807c3abad5..778d7e70c7d60 100755 --- a/build/git_revision.py +++ b/build/git_revision.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/build/zip.py b/build/zip.py index b257a7ad3c53c..0bcbc02fc9006 100755 --- a/build/zip.py +++ b/build/zip.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/ci/firebase_testlab.py b/ci/firebase_testlab.py index 7aef50c37918b..effd543819ecd 100755 --- a/ci/firebase_testlab.py +++ b/ci/firebase_testlab.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/shell/platform/fuchsia/flutter/build/asset_package.py b/shell/platform/fuchsia/flutter/build/asset_package.py index 90c98fdd2f085..5ec916f5ff027 100755 --- a/shell/platform/fuchsia/flutter/build/asset_package.py +++ b/shell/platform/fuchsia/flutter/build/asset_package.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/shell/platform/fuchsia/flutter/build/gen_debug_wrapper_main.py b/shell/platform/fuchsia/flutter/build/gen_debug_wrapper_main.py index c16a6feca7497..d5811d5cddb05 100755 --- a/shell/platform/fuchsia/flutter/build/gen_debug_wrapper_main.py +++ b/shell/platform/fuchsia/flutter/build/gen_debug_wrapper_main.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/sky/tools/create_ios_framework.py b/sky/tools/create_ios_framework.py index 6ceaa658f3aa0..67092cac3b6e9 100755 --- a/sky/tools/create_ios_framework.py +++ b/sky/tools/create_ios_framework.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/sky/tools/create_macos_gen_snapshots.py b/sky/tools/create_macos_gen_snapshots.py index af833076fec81..301f91cf28a8e 100755 --- a/sky/tools/create_macos_gen_snapshots.py +++ b/sky/tools/create_macos_gen_snapshots.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/sky/tools/create_xcframework.py b/sky/tools/create_xcframework.py index 0bdc952e61798..9bd0609457dbe 100755 --- a/sky/tools/create_xcframework.py +++ b/sky/tools/create_xcframework.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/sky/tools/dist_dart_pkg.py b/sky/tools/dist_dart_pkg.py index af8bd1dbb201d..2a01a571e3ae2 100755 --- a/sky/tools/dist_dart_pkg.py +++ b/sky/tools/dist_dart_pkg.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/sky/tools/flutter_gdb b/sky/tools/flutter_gdb index 0d2fa2adb8601..273952f415f78 100755 --- a/sky/tools/flutter_gdb +++ b/sky/tools/flutter_gdb @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/sky/tools/install_framework_headers.py b/sky/tools/install_framework_headers.py index a746ff90b0e7e..1defe100b1ea9 100755 --- a/sky/tools/install_framework_headers.py +++ b/sky/tools/install_framework_headers.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/sky/tools/objcopy.py b/sky/tools/objcopy.py index b8da36d43b8e3..ed2256bc5f209 100755 --- a/sky/tools/objcopy.py +++ b/sky/tools/objcopy.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/sky/tools/roll/patch.py b/sky/tools/roll/patch.py index f08b610e31601..f7242b4d92489 100755 --- a/sky/tools/roll/patch.py +++ b/sky/tools/roll/patch.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/sky/tools/roll/roll.py b/sky/tools/roll/roll.py index c4d322cb9cebb..b526c6b7c7318 100755 --- a/sky/tools/roll/roll.py +++ b/sky/tools/roll/roll.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/sky/tools/roll/utils.py b/sky/tools/roll/utils.py index c14732e34d12d..c5008eec30b33 100755 --- a/sky/tools/roll/utils.py +++ b/sky/tools/roll/utils.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/testing/rules/run_gradle.py b/testing/rules/run_gradle.py index 41bb007ea6cc9..cdde9a818e3a4 100644 --- a/testing/rules/run_gradle.py +++ b/testing/rules/run_gradle.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/testing/run_tests.py b/testing/run_tests.py index 50eea3b983f7a..5881e161b1d2d 100755 --- a/testing/run_tests.py +++ b/testing/run_tests.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/tools/android_illegal_imports.py b/tools/android_illegal_imports.py index e07573f141f92..6c292bea12401 100644 --- a/tools/android_illegal_imports.py +++ b/tools/android_illegal_imports.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/tools/androidx/generate_pom_file.py b/tools/androidx/generate_pom_file.py index b2cd3deac37de..10fe63338c739 100644 --- a/tools/androidx/generate_pom_file.py +++ b/tools/androidx/generate_pom_file.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2019 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/tools/dia_dll.py b/tools/dia_dll.py index 9366349878a9b..010ed4f1eeb2c 100644 --- a/tools/dia_dll.py +++ b/tools/dia_dll.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/tools/font-subset/test.py b/tools/font-subset/test.py index d97aa4f9f08c4..977dec352be44 100755 --- a/tools/font-subset/test.py +++ b/tools/font-subset/test.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/tools/fuchsia/build_fuchsia_artifacts.py b/tools/fuchsia/build_fuchsia_artifacts.py index a954230bc4c27..861b6eef819d0 100755 --- a/tools/fuchsia/build_fuchsia_artifacts.py +++ b/tools/fuchsia/build_fuchsia_artifacts.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/tools/fuchsia/compile_cml.py b/tools/fuchsia/compile_cml.py index 36acd818a43a8..ae058d2f53946 100755 --- a/tools/fuchsia/compile_cml.py +++ b/tools/fuchsia/compile_cml.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/tools/fuchsia/copy_debug_symbols.py b/tools/fuchsia/copy_debug_symbols.py index 4d4cdaef686ca..cc415eb59d420 100755 --- a/tools/fuchsia/copy_debug_symbols.py +++ b/tools/fuchsia/copy_debug_symbols.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/tools/fuchsia/copy_path.py b/tools/fuchsia/copy_path.py index 1dd4693237754..335c262ce3dee 100755 --- a/tools/fuchsia/copy_path.py +++ b/tools/fuchsia/copy_path.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/tools/fuchsia/gather_flutter_runner_artifacts.py b/tools/fuchsia/gather_flutter_runner_artifacts.py index b337deeaddfd2..e2d67ab8becf6 100755 --- a/tools/fuchsia/gather_flutter_runner_artifacts.py +++ b/tools/fuchsia/gather_flutter_runner_artifacts.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/tools/fuchsia/gen_package.py b/tools/fuchsia/gen_package.py index 873356f7c67fd..c9bd85b74aadb 100755 --- a/tools/fuchsia/gen_package.py +++ b/tools/fuchsia/gen_package.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/tools/fuchsia/gen_repo.py b/tools/fuchsia/gen_repo.py index 84a72603ce225..604fe33cb2367 100755 --- a/tools/fuchsia/gen_repo.py +++ b/tools/fuchsia/gen_repo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/tools/fuchsia/interpolate_test_suite.py b/tools/fuchsia/interpolate_test_suite.py index 0e484ded024b5..3e61f6520fb38 100755 --- a/tools/fuchsia/interpolate_test_suite.py +++ b/tools/fuchsia/interpolate_test_suite.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/tools/fuchsia/make_build_info.py b/tools/fuchsia/make_build_info.py index 4e79f8512bedd..d4565702a199c 100644 --- a/tools/fuchsia/make_build_info.py +++ b/tools/fuchsia/make_build_info.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/tools/fuchsia/merge_and_upload_debug_symbols.py b/tools/fuchsia/merge_and_upload_debug_symbols.py index 6b5786d2079b2..964358671e25f 100755 --- a/tools/fuchsia/merge_and_upload_debug_symbols.py +++ b/tools/fuchsia/merge_and_upload_debug_symbols.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/tools/fuchsia/parse_manifest.py b/tools/fuchsia/parse_manifest.py index bb7e4917e38eb..3863e6bae3199 100755 --- a/tools/fuchsia/parse_manifest.py +++ b/tools/fuchsia/parse_manifest.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be diff --git a/tools/gen_android_buildconfig.py b/tools/gen_android_buildconfig.py index f54c8723e914c..485d8f99987af 100644 --- a/tools/gen_android_buildconfig.py +++ b/tools/gen_android_buildconfig.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/tools/gen_javadoc.py b/tools/gen_javadoc.py index f19d2dda40094..b91096f79e3e4 100755 --- a/tools/gen_javadoc.py +++ b/tools/gen_javadoc.py @@ -1,4 +1,5 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 +# # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. diff --git a/tools/licenses/lib/main.dart b/tools/licenses/lib/main.dart index 2122f20b9e56c..3adbbf6a36163 100644 --- a/tools/licenses/lib/main.dart +++ b/tools/licenses/lib/main.dart @@ -77,7 +77,7 @@ class _RepositorySourceFile extends _RepositoryLicensedFile { fs.TextFile get ioTextFile => super.io as fs.TextFile; - static final RegExp _hashBangPattern = RegExp(r'^#! *(?:/bin/sh|/bin/bash|/usr/bin/env +(?:python|bash))\b'); + static final RegExp _hashBangPattern = RegExp(r'^#! *(?:/bin/sh|/bin/bash|/usr/bin/env +(?:python|python3|bash))\b'); @override bool get isShellScript {