Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: tools/run_pub.py

Issue 937243002: Revert "Revert "Use native async/await support in pub."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/lib/analyzer/analyze_library.status ('k') | tools/status_clean.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 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. 4 # BSD-style license that can be found in the LICENSE file.
5 """Used to run pub before the SDK has been built""" 5 """Used to run pub before the SDK has been built"""
6 6
7 import argparse 7 import argparse
8 import os 8 import os
9 import platform 9 import platform
10 import subprocess 10 import subprocess
11 import sys 11 import sys
12 12
13 SCRIPT_DIR = os.path.dirname(sys.argv[0]) 13 SCRIPT_DIR = os.path.dirname(sys.argv[0])
14 DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..')) 14 DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
15 PUB_PATH = os.path.join(DART_ROOT, 15 PUB_PATH = os.path.join(DART_ROOT, 'sdk/lib/_internal/pub/bin/pub.dart')
16 'sdk/lib/_internal/pub_generated/bin/pub.dart')
17 CANARY_PATH = os.path.join(DART_ROOT, 'tools', 'canary.dart') 16 CANARY_PATH = os.path.join(DART_ROOT, 'tools', 'canary.dart')
18 17
19 usage = """run_pub.py --package-root=<package root>""" 18 usage = """run_pub.py --package-root=<package root>"""
20 19
21 def BuildArguments(): 20 def BuildArguments():
22 result = argparse.ArgumentParser(usage=usage) 21 result = argparse.ArgumentParser(usage=usage)
23 result.add_argument("--package-root", help="package root", default=None) 22 result.add_argument("--package-root", help="package root", default=None)
24 result.add_argument("--dart-executable", help="dart binary", default=None) 23 result.add_argument("--dart-executable", help="dart binary", default=None)
25 return result 24 return result
26 25
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 (options, args) = parser.parse_known_args() 94 (options, args) = parser.parse_known_args()
96 if not ProcessOptions(options, args): 95 if not ProcessOptions(options, args):
97 parser.print_help() 96 parser.print_help()
98 return 1 97 return 1
99 dart_executable = FindDartExecutable(options.dart_executable, 98 dart_executable = FindDartExecutable(options.dart_executable,
100 options.package_root) 99 options.package_root)
101 return RunPub(dart_executable, options.package_root, args) 100 return RunPub(dart_executable, options.package_root, args)
102 101
103 102
104 if __name__ == '__main__': 103 if __name__ == '__main__':
105 sys.exit(main()); 104 sys.exit(main())
OLDNEW
« no previous file with comments | « tests/lib/analyzer/analyze_library.status ('k') | tools/status_clean.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698