Unverified Commit 497eb13d authored by Chris Bracken's avatar Chris Bracken Committed by GitHub

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
parent bffa11e2
......@@ -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
......
......@@ -669,7 +669,7 @@ class ArchivePublisher {
}
if (platform.isWindows) {
return _processRunner.runProcess(
<String>['python', path.join(platform.environment['DEPOT_TOOLS']!, 'gsutil.py'), '--', ...args],
<String>['python3', path.join(platform.environment['DEPOT_TOOLS']!, 'gsutil.py'), '--', ...args],
workingDirectory: workingDirectory,
failOk: failOk,
);
......
......@@ -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';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment