diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2001-01-19 16:26:12 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2001-01-19 16:26:12 (GMT) |
commit | 989835c9fc4e18f5b73dda9d1f6c769e78eecf77 (patch) | |
tree | f9c28279459040081fdc6c52b2918cb44db080a6 /Lib/distutils | |
parent | ae89af9c636103f425d477904911144f8aba2032 (diff) | |
download | cpython-989835c9fc4e18f5b73dda9d1f6c769e78eecf77.zip cpython-989835c9fc4e18f5b73dda9d1f6c769e78eecf77.tar.gz cpython-989835c9fc4e18f5b73dda9d1f6c769e78eecf77.tar.bz2 |
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.
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/util.py | 5 |
1 files changed, 5 insertions, 0 deletions
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) |