Commit 989835c9 authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

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.
parent ae89af9c
...@@ -54,6 +54,11 @@ def get_platform (): ...@@ -54,6 +54,11 @@ def get_platform ():
# fall through to standard osname-release-machine representation # fall through to standard osname-release-machine representation
elif osname[:4] == "irix": # could be "irix64"! elif osname[:4] == "irix": # could be "irix64"!
return "%s-%s" % (osname, release) 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) return "%s-%s-%s" % (osname, release, machine)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment