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

Side by Side Diff: tools/run_pub.py

Issue 1165473002: Start pulling pub from its own repo. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Code review changes Created 5 years, 6 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
« no previous file with comments | « tools/make_links.py ('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, 'sdk/lib/_internal/pub/bin/pub.dart') 15 PUB_PATH = os.path.join(DART_ROOT, 'third_party/pkg_tested/pub/bin/pub.dart')
16 CANARY_PATH = os.path.join(DART_ROOT, 'tools', 'canary.dart') 16 CANARY_PATH = os.path.join(DART_ROOT, 'tools', 'canary.dart')
17 17
18 usage = """run_pub.py --package-root=<package root>""" 18 usage = """run_pub.py --package-root=<package root>"""
19 19
20 def BuildArguments(): 20 def BuildArguments():
21 result = argparse.ArgumentParser(usage=usage) 21 result = argparse.ArgumentParser(usage=usage)
22 result.add_argument("--package-root", help="package root", default=None) 22 result.add_argument("--package-root", help="package root", default=None)
23 result.add_argument("--dart-executable", help="dart binary", default=None) 23 result.add_argument("--dart-executable", help="dart binary", default=None)
24 return result 24 return result
25 25
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 if not ProcessOptions(options, args): 95 if not ProcessOptions(options, args):
96 parser.print_help() 96 parser.print_help()
97 return 1 97 return 1
98 dart_executable = FindDartExecutable(options.dart_executable, 98 dart_executable = FindDartExecutable(options.dart_executable,
99 options.package_root) 99 options.package_root)
100 return RunPub(dart_executable, options.package_root, args) 100 return RunPub(dart_executable, options.package_root, args)
101 101
102 102
103 if __name__ == '__main__': 103 if __name__ == '__main__':
104 sys.exit(main()) 104 sys.exit(main())
OLDNEW
« no previous file with comments | « tools/make_links.py ('k') | tools/status_clean.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698