mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
Make code follow the Python style guidelines
+ Use a doc string for the whole file. + Lower case function names. + Consistently use single-quotes for quoted strings. + align wrapped elements with opening delimiter. + use a main() function Review URL: https://chromiumcodereview.appspot.com//10837127 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10307 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
6f5281c404
commit
5e62db3e6a
1 changed files with 11 additions and 7 deletions
|
@ -4,25 +4,29 @@
|
|||
# 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
|
||||
# is invoked by Dart beyond what can be done in the gclient hooks.
|
||||
"""
|
||||
Invoke gyp to generate build files for building the Dart VM.
|
||||
"""
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
def Execute(args):
|
||||
def execute(args):
|
||||
process = subprocess.Popen(args)
|
||||
process.wait()
|
||||
return process.returncode
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = ['python', "dart/third_party/gyp/gyp", "--depth=dart",
|
||||
"-Idart/tools/gyp/all.gypi", "dart/dart.gyp"]
|
||||
def main():
|
||||
args = ['python', 'dart/third_party/gyp/gyp', '--depth=dart',
|
||||
'-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))
|
||||
sys.exit(execute(args))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Reference in a new issue