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