Chromium Code Reviews| Index: bleeding_edge/dart/tools/gyp_dart.py |
| =================================================================== |
| --- bleeding_edge/dart/tools/gyp_dart.py (revision 0) |
| +++ bleeding_edge/dart/tools/gyp_dart.py (revision 0) |
| @@ -0,0 +1,28 @@ |
| +#!/usr/bin/env python |
|
Ivan Posva
2012/08/07 05:15:00
I am wondering why this file is really needed. We
|
| + |
| +# Copyright (c) 2012 The Dart Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +# This script is wrapper for Dart that adds some support for how GYP |
|
ahe
2012/08/06 19:00:15
Please follow this style guide: http://google-styl
Emily Fortuna
2012/08/06 19:36:33
I support using function_name as well, but just to
|
| +# is invoked by Dart beyond what can be done in the gclient hooks. |
| + |
| +import os |
| +import subprocess |
| +import sys |
| + |
| +def Execute(args): |
| + process = subprocess.Popen(args) |
|
ahe
2012/08/06 19:00:15
I think you need to call process.communicate here.
Emily Fortuna
2012/08/06 19:36:33
Only needed if he's PIPEing input or output: http:
|
| + process.wait() |
| + return process.returncode |
| + |
| +if __name__ == '__main__': |
| + args = ['python', "dart/third_party/gyp/gyp", "--depth=dart", |
|
ahe
2012/08/06 19:00:15
Please be consistent with ' and ".
|
| + "-Idart/tools/gyp/all.gypi", "dart/dart.gyp"] |
| + |
| + if sys.platform == 'win32': |
| + # Generate Visual Studio 2008 compatible files by default. |
| + if not os.environ.get('GYP_MSVS_VERSION'): |
| + args.extend(['-G', 'msvs_version=2008']) |
| + |
| + sys.exit(Execute(args)) |