From 989835c9fc4e18f5b73dda9d1f6c769e78eecf77 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 19 Jan 2001 16:26:12 +0000 Subject: 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. --- Lib/distutils/util.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Lib/distutils/util.py b/Lib/distutils/util.py index dd9de85..80e4814 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) -- cgit v0.12