Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
generate_package_config.py
Go to the documentation of this file.
1#!/usr/bin/env python3
2# Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file
3# for details. All rights reserved. Use of this source code is governed by a
4# BSD-style license that can be found in the LICENSE file.
5
6# Invoke the `tools/generate_package_config.dart` script.
7
8import os
9import os.path
10import platform
11import subprocess
12import sys
13
14USE_PYTHON3 = True
15
16
18 os_id = platform.system()
19 return os_id == 'Windows'
20
21
23 tools_dir = os.path.dirname(os.path.realpath(__file__))
24 return os.path.join(tools_dir, 'sdks', 'dart-sdk')
25
26
28 name = 'dart'
29 if is_windows():
30 name = 'dart.exe'
31 return os.path.join(checked_in_sdk_path(), 'bin', name)
32
33
35 tools_dir = os.path.dirname(os.path.realpath(__file__))
36 process = subprocess.run([
38 os.path.join(tools_dir, 'generate_package_config.dart')
39 ])
40 return process.returncode
41
42
43def Main():
44 sys.exit(generate_package_config())
45
46
47if __name__ == '__main__':
48 Main()