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

Side by Side Diff: dart/frog/scripts/bootstrap/frog_wrapper.py

Issue 10140021: Revert "Use 'frog' in apidoc. Also fix broken dependencies." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, 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 5
6 import imp 6 import imp
7 import os 7 import os
8 import sys 8 import sys
9 9
10 def main(args): 10 def main(args):
11 home = os.path.join(HOME, 'frog.py') 11 # Try to find frog.py from the current location.
12 home = os.path.join(os.curdir, 'frog.py')
13 if not os.path.exists(home):
14 home = os.path.join(os.curdir, 'frog', 'frog.py')
12 15
13 if not os.path.exists(home): 16 if not os.path.exists(home):
14 print "Could not find .../dart/frog/frog.py" 17 print "Could not find frog"
15 return 1 18 return 1
16 19
17 frog_args = [ 'frog.py', '--vm=%s' % VM] 20 frog_args = [ 'frog.py', '--vm=%s' % VM]
18 js_cmd_flag = '--js_cmd=%s --crankshaft' % D8 21 js_cmd_flag = '--js_cmd=%s --crankshaft' % D8
19 vm_flags = None 22 vm_flags = None
20 for arg in args: 23 for arg in args:
21 if arg.startswith('--js_cmd'): 24 if arg.startswith('--js_cmd'):
22 js_cmd_flag = arg 25 js_cmd_flag = arg
23 if arg.startswith('--vm_flags'): 26 if arg.startswith('--vm_flags'):
24 vm_flags = arg 27 vm_flags = arg
(...skipping 13 matching lines...) Expand all
38 # Load frog.py and invoke it. 41 # Load frog.py and invoke it.
39 paths = [os.path.dirname(home)] 42 paths = [os.path.dirname(home)]
40 (filename, pathname, description) = imp.find_module('frog', paths) 43 (filename, pathname, description) = imp.find_module('frog', paths)
41 module = imp.load_module('frog', filename, pathname, description) 44 module = imp.load_module('frog', filename, pathname, description)
42 exit_code = module.main(frog_args) 45 exit_code = module.main(frog_args)
43 finally: 46 finally:
44 if filename: 47 if filename:
45 filename.close() 48 filename.close()
46 49
47 return exit_code 50 return exit_code
OLDNEW
« no previous file with comments | « dart/frog/scripts/bootstrap/frog_bootstrap_wrapper.py ('k') | dart/lib/dartdoc/client-live-nav.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698