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.
This commit is contained in:
Andrew M. Kuchling 2001-01-19 16:26:12 +00:00
parent ae89af9c63
commit 989835c9fc

View File

@ -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)