| OLD | NEW |
| 1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 if machine.startswith('arm'): | 95 if machine.startswith('arm'): |
| 96 return 'arm' | 96 return 'arm' |
| 97 elif (not machine) or (not re.match('(x|i[3-6])86$', machine) is None): | 97 elif (not machine) or (not re.match('(x|i[3-6])86$', machine) is None): |
| 98 return 'ia32' | 98 return 'ia32' |
| 99 elif machine == 'i86pc': | 99 elif machine == 'i86pc': |
| 100 return 'ia32' | 100 return 'ia32' |
| 101 elif machine == 'x86_64': | 101 elif machine == 'x86_64': |
| 102 return 'ia32' | 102 return 'ia32' |
| 103 elif machine == 'amd64': | 103 elif machine == 'amd64': |
| 104 return 'ia32' | 104 return 'ia32' |
| 105 elif machine == 's390x': |
| 106 return 's390' |
| 105 elif machine == 'ppc64': | 107 elif machine == 'ppc64': |
| 106 return 'ppc' | 108 return 'ppc' |
| 107 else: | 109 else: |
| 108 return None | 110 return None |
| 109 | 111 |
| 110 | 112 |
| 111 def GuessWordsize(): | 113 def GuessWordsize(): |
| 112 if '64' in platform.machine(): | 114 if '64' in platform.machine(): |
| 113 return '64' | 115 return '64' |
| 114 else: | 116 else: |
| (...skipping 12 matching lines...) Expand all Loading... |
| 127 # In python 2.7.6 on windows, urlopen has a problem with redirects. | 129 # In python 2.7.6 on windows, urlopen has a problem with redirects. |
| 128 # Try using curl instead. Note, this is fixed in 2.7.8. | 130 # Try using curl instead. Note, this is fixed in 2.7.8. |
| 129 subprocess.check_call(["curl", source, '-k', '-L', '-o', destination]) | 131 subprocess.check_call(["curl", source, '-k', '-L', '-o', destination]) |
| 130 return | 132 return |
| 131 except: | 133 except: |
| 132 # If there's no curl, fall back to urlopen. | 134 # If there's no curl, fall back to urlopen. |
| 133 print "Curl is currently not installed. Falling back to python." | 135 print "Curl is currently not installed. Falling back to python." |
| 134 pass | 136 pass |
| 135 with open(destination, 'w') as f: | 137 with open(destination, 'w') as f: |
| 136 f.write(urllib2.urlopen(source).read()) | 138 f.write(urllib2.urlopen(source).read()) |
| OLD | NEW |