OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium 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 Chromium that adds some support for how GYP | 7 # This script is wrapper for Chromium that adds some support for how GYP |
8 # is invoked by Chromium beyond what can be done in the gclient hooks. | 8 # is invoked by Chromium beyond what can be done in the gclient hooks. |
9 | 9 |
10 import glob | 10 import glob |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 return result | 100 return result |
101 | 101 |
102 if __name__ == '__main__': | 102 if __name__ == '__main__': |
103 args = sys.argv[1:] | 103 args = sys.argv[1:] |
104 | 104 |
105 # Use the Psyco JIT if available. | 105 # Use the Psyco JIT if available. |
106 if psyco: | 106 if psyco: |
107 psyco.profile() | 107 psyco.profile() |
108 print "Enabled Psyco JIT." | 108 print "Enabled Psyco JIT." |
109 | 109 |
| 110 os.environ['GYP_MSVS_VERSION'] = '2010' |
| 111 |
110 # Fall back on hermetic python if we happen to get run under cygwin. | 112 # Fall back on hermetic python if we happen to get run under cygwin. |
111 # TODO(bradnelson): take this out once this issue is fixed: | 113 # TODO(bradnelson): take this out once this issue is fixed: |
112 # http://code.google.com/p/gyp/issues/detail?id=177 | 114 # http://code.google.com/p/gyp/issues/detail?id=177 |
113 if sys.platform == 'cygwin': | 115 if sys.platform == 'cygwin': |
114 python_dir = os.path.join(chrome_src, 'third_party', 'python_26') | 116 python_dir = os.path.join(chrome_src, 'third_party', 'python_26') |
115 env = os.environ.copy() | 117 env = os.environ.copy() |
116 env['PATH'] = python_dir + os.pathsep + env.get('PATH', '') | 118 env['PATH'] = python_dir + os.pathsep + env.get('PATH', '') |
117 p = subprocess.Popen( | 119 p = subprocess.Popen( |
118 [os.path.join(python_dir, 'python.exe')] + sys.argv, | 120 [os.path.join(python_dir, 'python.exe')] + sys.argv, |
119 env=env, shell=False) | 121 env=env, shell=False) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 # to enfore syntax checking. | 164 # to enfore syntax checking. |
163 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') | 165 syntax_check = os.environ.get('CHROMIUM_GYP_SYNTAX_CHECK') |
164 if syntax_check and int(syntax_check): | 166 if syntax_check and int(syntax_check): |
165 args.append('--check') | 167 args.append('--check') |
166 | 168 |
167 print 'Updating projects from gyp files...' | 169 print 'Updating projects from gyp files...' |
168 sys.stdout.flush() | 170 sys.stdout.flush() |
169 | 171 |
170 # Off we go... | 172 # Off we go... |
171 sys.exit(gyp.main(args)) | 173 sys.exit(gyp.main(args)) |
OLD | NEW |