| 46 | |
| 47 | |
| 48 | def GuessOS(): |
| 49 | id = platform.system() |
| 50 | if id == 'Linux': |
| 51 | return 'linux' |
| 52 | elif id == 'Darwin': |
| 53 | return 'macos' |
| 54 | elif id.find('CYGWIN') >= 0: |
| 55 | return 'cygwin' |
| 56 | elif id == 'Windows' or id == 'Microsoft': |
| 57 | # On Windows Vista platform.system() can return 'Microsoft' with some |
| 58 | # versions of Python, see http://bugs.python.org/issue1082 |
| 59 | return 'win32' |
| 60 | elif id == 'FreeBSD': |
| 61 | return 'freebsd' |
| 62 | elif id == 'OpenBSD': |
| 63 | return 'openbsd' |
| 64 | elif id == 'SunOS': |
| 65 | return 'solaris' |
| 66 | elif id == 'NetBSD': |
| 67 | return 'netbsd' |
| 68 | elif id == 'DragonFly': |
| 69 | # Doing so on purpose as they are pretty close |
| 70 | # minus few features |
| 71 | return 'freebsd' |
| 72 | elif id == 'AIX': |
| 73 | return 'aix' |
| 74 | elif id == 'OS400': |
| 75 | return 'ibmi' |
| 76 | else: |
| 77 | return None |
| 78 | |
| 79 | |
| 80 | # This will default to building the 32 bit VM even on machines that are capable |