|
16 | 16 | from distutils.errors import DistutilsByteCompileError |
17 | 17 |
|
18 | 18 | def get_platform (): |
19 | | - """Return a string that identifies the current platform. This is used |
20 | | - mainly to distinguish platform-specific build directories and |
21 | | - platform-specific built distributions. Typically includes the OS name |
22 | | - and version and the architecture (as supplied by 'os.uname()'), |
23 | | - although the exact information included depends on the OS; eg. for IRIX |
24 | | - the architecture isn't particularly important (IRIX only runs on SGI |
25 | | - hardware), but for Linux the kernel version isn't particularly |
26 | | - important. |
| 19 | + """Return a string that identifies the current platform. This is used mainly to |
| 20 | + distinguish platform-specific build directories and platform-specific built |
| 21 | + distributions. Typically includes the OS name and version and the |
| 22 | + architecture (as supplied by 'os.uname()'), although the exact information |
| 23 | + included depends on the OS; eg. on Linux, the kernel version isn't |
| 24 | + particularly important. |
27 | 25 |
|
28 | 26 | Examples of returned values: |
29 | 27 | linux-i586 |
30 | 28 | linux-alpha (?) |
31 | 29 | solaris-2.6-sun4u |
32 | | - irix-5.3 |
33 | | - irix64-6.2 |
34 | 30 |
|
35 | 31 | Windows will return one of: |
36 | 32 | win-amd64 (64bit Windows on AMD64 (aka x86_64, Intel64, EM64T, etc) |
37 | 33 | win-ia64 (64bit Windows on Itanium) |
38 | 34 | win32 (all others - specifically, sys.platform is returned) |
39 | 35 |
|
40 | 36 | For other non-POSIX platforms, currently just returns 'sys.platform'. |
| 37 | +
|
41 | 38 | """ |
42 | 39 | if os.name == 'nt': |
43 | 40 | # sniff sys.version for architecture. |
@@ -87,8 +84,6 @@ def get_platform (): |
87 | 84 | bitness = {2147483647:"32bit", 9223372036854775807:"64bit"} |
88 | 85 | machine += ".%s" % bitness[sys.maxsize] |
89 | 86 | # fall through to standard osname-release-machine representation |
90 | | - elif osname[:4] == "irix": # could be "irix64"! |
91 | | - return "%s-%s" % (osname, release) |
92 | 87 | elif osname[:3] == "aix": |
93 | 88 | return "%s-%s.%s" % (osname, version, release) |
94 | 89 | elif osname[:6] == "cygwin": |
|
0 commit comments