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

Side by Side Diff: tools/gyp_dart.py

Issue 998133002: Suppress loading site packages when running gyp from tools/gyp_dart.py. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 """ 7 """
8 Invoke gyp to generate build files for building the Dart VM. 8 Invoke gyp to generate build files for building the Dart VM.
9 """ 9 """
10 10
11 import os 11 import os
12 import subprocess 12 import subprocess
13 import sys 13 import sys
14 14
15 def execute(args): 15 def execute(args):
16 process = subprocess.Popen(args) 16 process = subprocess.Popen(args)
17 process.wait() 17 process.wait()
18 return process.returncode 18 return process.returncode
19 19
20 def main(): 20 def main():
21 component = 'all' 21 component = 'all'
22 if len(sys.argv) == 2: 22 if len(sys.argv) == 2:
23 component = sys.argv[1] 23 component = sys.argv[1]
24 24
25 component_gyp_files = { 25 component_gyp_files = {
26 'all' : 'dart/dart.gyp', 26 'all' : 'dart/dart.gyp',
27 'runtime' : 'dart/runtime/dart-runtime.gyp', 27 'runtime' : 'dart/runtime/dart-runtime.gyp',
28 } 28 }
29 args = ['python', 'dart/third_party/gyp/gyp_main.py', 29 args = ['python', '-S', 'dart/third_party/gyp/gyp_main.py',
30 '--depth=dart', '-Idart/tools/gyp/all.gypi', 30 '--depth=dart', '-Idart/tools/gyp/all.gypi',
31 component_gyp_files[component]] 31 component_gyp_files[component]]
32 32
33 if sys.platform == 'win32': 33 if sys.platform == 'win32':
34 # Generate Visual Studio 2010 compatible files by default. 34 # Generate Visual Studio 2010 compatible files by default.
35 if not os.environ.get('GYP_MSVS_VERSION'): 35 if not os.environ.get('GYP_MSVS_VERSION'):
36 args.extend(['-G', 'msvs_version=2010']) 36 args.extend(['-G', 'msvs_version=2010'])
37 37
38 sys.exit(execute(args)) 38 sys.exit(execute(args))
39 39
40 if __name__ == '__main__': 40 if __name__ == '__main__':
41 main() 41 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