[Python-checkins] python/dist/src/Lib/distutils cygwinccompiler.py,1.22,1.23

jlt63@users.sourceforge.net jlt63@users.sourceforge.net
Wed, 09 Apr 2003 13:14:07 -0700


Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory sc8-pr-cvs1:/tmp/cvs-serv18318

Modified Files:
	cygwinccompiler.py 
Log Message:
Patch #718551: cygwinccompiler.get_versions() patch

The cygwinccompiler.get_versions() function only handles versions numbers of
the form "x.y.z".  The attached patch enhances get_versions() to handle "x.y"
too (i.e., the ".z" is optional). 

This change causes the unnecessary "--entry _DllMain@12" link option to be
suppressed for recent Cygwin and Mingw toolchains. Additionally, it directs
recent Mingw toolchains to use gcc instead of dllwrap during linking.


Index: cygwinccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/cygwinccompiler.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** cygwinccompiler.py	9 Apr 2003 16:03:57 -0000	1.22
--- cygwinccompiler.py	9 Apr 2003 20:13:59 -0000	1.23
***************
*** 358,362 ****
          out_string = out.read()
          out.close()
!         result = re.search('(\d+\.\d+\.\d+)',out_string)
          if result:
              gcc_version = StrictVersion(result.group(1))
--- 358,362 ----
          out_string = out.read()
          out.close()
!         result = re.search('(\d+\.\d+(\.\d+)*)',out_string)
          if result:
              gcc_version = StrictVersion(result.group(1))
***************
*** 370,374 ****
          out_string = out.read()
          out.close()
!         result = re.search('(\d+\.\d+\.\d+)',out_string)
          if result:
              ld_version = StrictVersion(result.group(1))
--- 370,374 ----
          out_string = out.read()
          out.close()
!         result = re.search('(\d+\.\d+(\.\d+)*)',out_string)
          if result:
              ld_version = StrictVersion(result.group(1))
***************
*** 382,386 ****
          out_string = out.read()
          out.close()
!         result = re.search(' (\d+\.\d+\.\d+)',out_string)
          if result:
              dllwrap_version = StrictVersion(result.group(1))
--- 382,386 ----
          out_string = out.read()
          out.close()
!         result = re.search(' (\d+\.\d+(\.\d+)*)',out_string)
          if result:
              dllwrap_version = StrictVersion(result.group(1))