OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 import re | 6 import re |
7 import subprocess | 7 import subprocess |
8 import sys | 8 import sys |
9 | 9 |
10 def main(): | 10 def main(): |
(...skipping 17 matching lines...) Expand all Loading... |
28 elif (major == 4 and minor >= 5) or major == 5: | 28 elif (major == 4 and minor >= 5) or major == 5: |
29 # XCode seems to select the specific clang version automatically | 29 # XCode seems to select the specific clang version automatically |
30 return 'com.apple.compilers.llvm.clang.1_0' | 30 return 'com.apple.compilers.llvm.clang.1_0' |
31 else: | 31 else: |
32 raise Exception('Unknown XCode Version "%s"' % stdout) | 32 raise Exception('Unknown XCode Version "%s"' % stdout) |
33 else: | 33 else: |
34 raise Exception('Could not parse output of xcodebuild "%s"' % stdout) | 34 raise Exception('Could not parse output of xcodebuild "%s"' % stdout) |
35 | 35 |
36 if __name__ == '__main__': | 36 if __name__ == '__main__': |
37 if sys.platform != 'darwin': | 37 if sys.platform != 'darwin': |
38 raise Exception("This script only runs on Mac") | 38 #raise Exception("This script only runs on Mac") |
39 print main() | 39 # If we aren't on Mac, print out a dummy version string; it won't be used. |
| 40 print 'X.X' |
| 41 else: |
| 42 print main() |
OLD | NEW |