From: Andrew M. Kuchling Date: Fri, 19 Jan 2001 16:26:12 +0000 (+0000) Subject: Patch #103220 from Jason Tishler: X-Git-Tag: v2.1a1~113 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=989835c9fc4e18f5b73dda9d1f6c769e78eecf77;p=python Patch #103220 from Jason Tishler: This patch adds support for Cygwin to util.get_platform(). A Cygwin specific case is needed due to the format of Cygwin's uname command, which contains '/' characters. --- diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index dd9de854f9..80e4814389 100644 --- a/Lib/distutils/util.py +++ b/Lib/distutils/util.py @@ -54,6 +54,11 @@ def get_platform (): # fall through to standard osname-release-machine representation elif osname[:4] == "irix": # could be "irix64"! return "%s-%s" % (osname, release) + elif osname[:6] == "cygwin": + rel_re = re.compile (r'[\d.]+') + m = rel_re.match(release) + if m: + release = m.group() return "%s-%s-%s" % (osname, release, machine)