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 47 matching lines...) Loading... |
58 system = platform.system() | 58 system = platform.system() |
59 if system == 'Linux': | 59 if system == 'Linux': |
60 return 'linux' | 60 return 'linux' |
61 elif system == 'Darwin': | 61 elif system == 'Darwin': |
62 return 'macos' | 62 return 'macos' |
63 elif system.find('CYGWIN') >= 0: | 63 elif system.find('CYGWIN') >= 0: |
64 return 'cygwin' | 64 return 'cygwin' |
65 elif system == 'Windows' or system == 'Microsoft': | 65 elif system == 'Windows' or system == 'Microsoft': |
66 # On Windows Vista platform.system() can return 'Microsoft' with some | 66 # On Windows Vista platform.system() can return 'Microsoft' with some |
67 # versions of Python, see http://bugs.python.org/issue1082 | 67 # versions of Python, see http://bugs.python.org/issue1082 |
68 return 'win32' | 68 return 'windows' |
69 elif system == 'FreeBSD': | 69 elif system == 'FreeBSD': |
70 return 'freebsd' | 70 return 'freebsd' |
71 elif system == 'OpenBSD': | 71 elif system == 'OpenBSD': |
72 return 'openbsd' | 72 return 'openbsd' |
73 elif system == 'SunOS': | 73 elif system == 'SunOS': |
74 return 'solaris' | 74 return 'solaris' |
75 elif system == 'NetBSD': | 75 elif system == 'NetBSD': |
76 return 'netbsd' | 76 return 'netbsd' |
77 else: | 77 else: |
78 return None | 78 return None |
(...skipping 19 matching lines...) Loading... |
98 | 98 |
99 | 99 |
100 def GuessWordsize(): | 100 def GuessWordsize(): |
101 if '64' in platform.machine(): | 101 if '64' in platform.machine(): |
102 return '64' | 102 return '64' |
103 else: | 103 else: |
104 return '32' | 104 return '32' |
105 | 105 |
106 | 106 |
107 def IsWindows(): | 107 def IsWindows(): |
108 return GuessOS() == 'win32' | 108 return GuessOS() == 'windows' |
OLD | NEW |