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

Side by Side Diff: bleeding_edge/dart/tools/gyp_dart.py

Issue 10837127: Make code follow the Python style guidelines (Closed) Base URL: http://dart.googlecode.com/svn/branches/
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | 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 2
3 # Copyright (c) 2012 The Dart Authors. All rights reserved. 3 # Copyright (c) 2012 The Dart Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # This script is wrapper for Dart that adds some support for how GYP 7 """
8 # is invoked by Dart beyond what can be done in the gclient hooks. 8 Invoke gyp to generate build files for building the Dart VM.
9 """
9 10
10 import os 11 import os
11 import subprocess 12 import subprocess
12 import sys 13 import sys
13 14
14 def Execute(args): 15 def execute(args):
15 process = subprocess.Popen(args) 16 process = subprocess.Popen(args)
16 process.wait() 17 process.wait()
17 return process.returncode 18 return process.returncode
18 19
19 if __name__ == '__main__': 20 def main():
20 args = ['python', "dart/third_party/gyp/gyp", "--depth=dart", 21 args = ['python', 'dart/third_party/gyp/gyp', '--depth=dart',
21 "-Idart/tools/gyp/all.gypi", "dart/dart.gyp"] 22 '-Idart/tools/gyp/all.gypi', 'dart/dart.gyp']
22 23
23 if sys.platform == 'win32': 24 if sys.platform == 'win32':
24 # Generate Visual Studio 2008 compatible files by default. 25 # Generate Visual Studio 2008 compatible files by default.
25 if not os.environ.get('GYP_MSVS_VERSION'): 26 if not os.environ.get('GYP_MSVS_VERSION'):
26 args.extend(['-G', 'msvs_version=2008']) 27 args.extend(['-G', 'msvs_version=2008'])
27 28
28 sys.exit(Execute(args)) 29 sys.exit(execute(args))
30
31 if __name__ == '__main__':
32 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698