From 497eb13d03f04a21125c6d8a3ee4f465a97e77e4 Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 6 Aug 2021 14:42:08 -0700 Subject: [PATCH] Migrate python invocations to python3 (#87759) Python 2 has been end-of-life'd since January 2020, all Python scripts on which Flutter depends have been migrated to Python 3. This changes documentation and remaining invocations to explicitly invoke python3. Issue: https://github.com/flutter/flutter/issues/83043 --- dev/bots/README.md | 2 +- dev/bots/prepare_package.dart | 2 +- dev/bots/test/prepare_package_test.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/bots/README.md b/dev/bots/README.md index 37a566505f..59ebf6d0bd 100644 --- a/dev/bots/README.md +++ b/dev/bots/README.md @@ -47,7 +47,7 @@ To run `prepare_package.dart` locally: - Make sure the `depot_tools` is in your `PATH`. If you're on Windows, you also need an environment variable called `DEPOT_TOOLS` with the path to `depot_tools` as value. -- Run `gsutil.py config` (or `python %DEPOT_TOOLS%\gsutil.py` on Windows) to +- Run `gsutil.py config` (or `python3 %DEPOT_TOOLS%\gsutil.py` on Windows) to authenticate with your auth token. - Create a local temp directory. `cd` into it. - Run `dart [path to your normal Flutter repo]/dev/bots/prepare_package.dart diff --git a/dev/bots/prepare_package.dart b/dev/bots/prepare_package.dart index e3f3e5c3d4..df57ea66ff 100644 --- a/dev/bots/prepare_package.dart +++ b/dev/bots/prepare_package.dart @@ -669,7 +669,7 @@ class ArchivePublisher { } if (platform.isWindows) { return _processRunner.runProcess( - ['python', path.join(platform.environment['DEPOT_TOOLS']!, 'gsutil.py'), '--', ...args], + ['python3', path.join(platform.environment['DEPOT_TOOLS']!, 'gsutil.py'), '--', ...args], workingDirectory: workingDirectory, failOk: failOk, ); diff --git a/dev/bots/test/prepare_package_test.dart b/dev/bots/test/prepare_package_test.dart index d88d553d28..a6f9f552c4 100644 --- a/dev/bots/test/prepare_package_test.dart +++ b/dev/bots/test/prepare_package_test.dart @@ -289,7 +289,7 @@ void main() { late FakeProcessManager processManager; late Directory tempDir; final String gsutilCall = platform.isWindows - ? 'python ${path.join("D:", "depot_tools", "gsutil.py")}' + ? 'python3 ${path.join("D:", "depot_tools", "gsutil.py")}' : 'gsutil.py'; final String releasesName = 'releases_$platformName.json'; final String archiveName = platform.isLinux ? 'archive.tar.xz' : 'archive.zip';