]> granicus.if.org Git - python/commitdiff
Patch #103220 from Jason Tishler:
authorAndrew M. Kuchling <amk@amk.ca>
Fri, 19 Jan 2001 16:26:12 +0000 (16:26 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Fri, 19 Jan 2001 16:26:12 +0000 (16:26 +0000)
  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

index dd9de854f94be94e515a831724813611317f691b..80e4814389c00e9c8506b8d1facb5ec306a39ebc 100644 (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)