From: Greg Ward Date: Fri, 31 Mar 2000 04:40:25 +0000 (+0000) Subject: Tweaked 'get_platform()' to include the first character of the OS release: X-Git-Tag: v1.6a1~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6ce00b44405a478039d81a6c096620338b5d03a7;p=python Tweaked 'get_platform()' to include the first character of the OS release: eg. sunos5, linux2, irix5. --- diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index 6674d0aa18..63b6bec05a 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -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