]> granicus.if.org Git - python/commitdiff
Tweaked 'get_platform()' to include the first character of the OS release:
authorGreg Ward <gward@python.net>
Fri, 31 Mar 2000 04:40:25 +0000 (04:40 +0000)
committerGreg Ward <gward@python.net>
Fri, 31 Mar 2000 04:40:25 +0000 (04:40 +0000)
eg. sunos5, linux2, irix5.

Lib/distutils/util.py

index 6674d0aa18e19ae9b615180f6e36eb45129a2f75..63b6bec05a626a6c39580abde8f276e266a2b716 100644 (file)
@@ -545,10 +545,8 @@ def get_platform ():
        i.e. "???" or "???"."""
 
     if os.name == 'posix':
-        uname = os.uname()
-        OS = uname[0]
-        arch = uname[4]
-        return "%s-%s" % (string.lower (OS), string.lower (arch))
+        (OS, _, rel, _, arch) = os.uname()
+        return "%s%c-%s" % (string.lower (OS), rel[0], string.lower (arch))
     else:
         return sys.platform