| 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 if machine.startswith('arm'): | 92 if machine.startswith('arm'): |
| 93 return 'arm' | 93 return 'arm' |
| 94 elif (not machine) or (not re.match('(x|i[3-6])86$', machine) is None): | 94 elif (not machine) or (not re.match('(x|i[3-6])86$', machine) is None): |
| 95 return 'ia32' | 95 return 'ia32' |
| 96 elif machine == 'i86pc': | 96 elif machine == 'i86pc': |
| 97 return 'ia32' | 97 return 'ia32' |
| 98 elif machine == 'x86_64': | 98 elif machine == 'x86_64': |
| 99 return 'ia32' | 99 return 'ia32' |
| 100 elif machine == 'amd64': | 100 elif machine == 'amd64': |
| 101 return 'ia32' | 101 return 'ia32' |
| 102 elif id == 'ppc64': |
| 103 return 'ppc' |
| 102 else: | 104 else: |
| 103 return None | 105 return None |
| 104 | 106 |
| 105 | 107 |
| 106 def GuessWordsize(): | 108 def GuessWordsize(): |
| 107 if '64' in platform.machine(): | 109 if '64' in platform.machine(): |
| 108 return '64' | 110 return '64' |
| 109 else: | 111 else: |
| 110 return '32' | 112 return '32' |
| 111 | 113 |
| 112 | 114 |
| 113 def IsWindows(): | 115 def IsWindows(): |
| 114 return GuessOS() == 'windows' | 116 return GuessOS() == 'windows' |
| 115 | 117 |
| 116 | 118 |
| 117 def URLRetrieve(source, destination): | 119 def URLRetrieve(source, destination): |
| 118 """urllib is broken for SSL connections via a proxy therefore we | 120 """urllib is broken for SSL connections via a proxy therefore we |
| 119 can't use urllib.urlretrieve().""" | 121 can't use urllib.urlretrieve().""" |
| 120 with open(destination, 'w') as f: | 122 with open(destination, 'w') as f: |
| 121 f.write(urllib2.urlopen(source).read()) | 123 f.write(urllib2.urlopen(source).read()) |
| OLD | NEW |