mirror of https://github.com/python/cpython.git
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:
parent
ae89af9c63
commit
989835c9fc
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue