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

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

Issue 2218773004: Fail with a clear error if the required SDK is not installed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 """Prints the lowest locally available SDK version greater than or equal to a 6 """Prints the lowest locally available SDK version greater than or equal to a
7 given minimum sdk version to standard output. 7 given minimum sdk version to standard output.
8 8
9 Usage: 9 Usage:
10 python find_sdk.py 10.6 # Ignores SDKs < 10.6 10 python find_sdk.py 10.6 # Ignores SDKs < 10.6
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 print >> sys.stderr, ' vvvvvvv' 68 print >> sys.stderr, ' vvvvvvv'
69 print >> sys.stderr, '' 69 print >> sys.stderr, ''
70 print >> sys.stderr, \ 70 print >> sys.stderr, \
71 'This build requires the %s SDK, but it was not found on your system.' \ 71 'This build requires the %s SDK, but it was not found on your system.' \
72 % min_sdk_version 72 % min_sdk_version
73 print >> sys.stderr, \ 73 print >> sys.stderr, \
74 'Either install it, or explicitly set mac_sdk in your GYP_DEFINES.' 74 'Either install it, or explicitly set mac_sdk in your GYP_DEFINES.'
75 print >> sys.stderr, '' 75 print >> sys.stderr, ''
76 print >> sys.stderr, ' ^^^^^^^' 76 print >> sys.stderr, ' ^^^^^^^'
77 print >> sys.stderr, '' 77 print >> sys.stderr, ''
78 return min_sdk_version 78 sys.exit(1)
79 79
80 if options.print_sdk_path: 80 if options.print_sdk_path:
81 print subprocess.check_output( 81 print subprocess.check_output(
82 ['xcrun', '-sdk', 'macosx' + best_sdk, '--show-sdk-path']).strip() 82 ['xcrun', '-sdk', 'macosx' + best_sdk, '--show-sdk-path']).strip()
83 83
84 return best_sdk 84 return best_sdk
85 85
86 86
87 if __name__ == '__main__': 87 if __name__ == '__main__':
88 if sys.platform != 'darwin': 88 if sys.platform != 'darwin':
89 raise Exception("This script only runs on Mac") 89 raise Exception("This script only runs on Mac")
90 print main() 90 print main()
91 sys.exit(0) 91 sys.exit(0)
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