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

Side by Side Diff: build/mac/find_sdk.py

Issue 146613006: Fixed sync on OS X v10.6 (Snow Leopard). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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
« 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 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import os 6 import os
7 import re 7 import re
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 'This build requires the %s SDK, but it was not found on your system.' \ 70 'This build requires the %s SDK, but it was not found on your system.' \
71 % min_sdk_version 71 % min_sdk_version
72 print >>sys.stderr, \ 72 print >>sys.stderr, \
73 'Either install it, or explicitly set mac_sdk in your GYP_DEFINES.' 73 'Either install it, or explicitly set mac_sdk in your GYP_DEFINES.'
74 print >>sys.stderr, '' 74 print >>sys.stderr, ''
75 print >>sys.stderr, ' ^^^^^^^' 75 print >>sys.stderr, ' ^^^^^^^'
76 print >>sys.stderr, '' 76 print >>sys.stderr, ''
77 return min_sdk_version 77 return min_sdk_version
78 78
79 if options.print_sdk_path: 79 if options.print_sdk_path:
80 print subprocess.check_output(['xcodebuild', '-version', '-sdk', 80 job = subprocess.Popen(['xcodebuild', '-version', '-sdk',
81 'macosx' + best_sdk, 'Path']).strip() 81 'macosx' + best_sdk, 'Path'],
82 stdout=subprocess.PIPE,
83 stderr=subprocess.STDOUT)
84 out, err = job.communicate()
85 if job.returncode != 0:
86 print >>sys.stderr, out
87 print >>sys.stderr, err
88 raise Exception('No %s SDK found' % best_sdk)
89 print out.strip()
82 90
83 return best_sdk 91 return best_sdk
84 92
85 93
86 if __name__ == '__main__': 94 if __name__ == '__main__':
87 if sys.platform != 'darwin': 95 if sys.platform != 'darwin':
88 raise Exception("This script only runs on Mac") 96 raise Exception("This script only runs on Mac")
89 print main() 97 print 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