This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zooko
Recipients zooko
Date 2008-10-22.13:17:53
SpamBayes Score 4.359901e-05
Marked as misclassified No
Message-id <1224681475.69.0.42802955697.issue4172@psf.upfronthosting.co.za>
In-reply-to
Content
When I build an extension module with cygwin g++ and "compiler=mingw32"
in my distutils config file, the build fails with:

  File
"c:\python25\lib\site-packages\setuptools-0.6c9.egg\setuptools\command\build_ext.py",
line 46, in run
    _build_ext.run(self)
  File "c:\Python25\lib\distutils\command\build_ext.py", line 264, in run
    force=self.force)
  File "c:\Python25\lib\distutils\ccompiler.py", line 1175, in new_compiler
    return klass (None, dry_run, force)
  File "c:\Python25\lib\distutils\cygwinccompiler.py", line 292, in __init__
    CygwinCCompiler.__init__ (self, verbose, dry_run, force)
  File "c:\Python25\lib\distutils\cygwinccompiler.py", line 84, in __init__
    get_versions()
  File "c:\Python25\lib\distutils\cygwinccompiler.py", line 424, in
get_versions
    ld_version = StrictVersion(result.group(1))
  File "c:\Python25\lib\distutils\version.py", line 40, in __init__
    self.parse(vstring)
  File "c:\Python25\lib\distutils\version.py", line 107, in parse
    raise ValueError, "invalid version number '%s'" % vstring
ValueError: invalid version number '2.18.50.20080625'


If I change "StrictVersion" to "LooseVersion" in cygwinccompiler.py,
then the build succeeds:

C:\playground\allmydata\tahoe\installtahoe\allmydata-tahoe-1.2.0-r3092-SUMO>diff
-u C:\Python25\Lib\distutils\cygwinccompiler.py
C:\Python25\Lib\distutils\cyg
winccompiler.py.new
--- C:\Python25\Lib\distutils\cygwinccompiler.py        2008-10-22
07:09:26.765625000 -0600
+++ C:\Python25\Lib\distutils\cygwinccompiler.py.new    2008-10-22
07:09:06.234375000 -0600
@@ -398,7 +398,7 @@
     """ Try to find out the versions of gcc, ld and dllwrap.
         If not possible it returns None for it.
     """
-    from distutils.version import StrictVersion
+    from distutils.version import LooseVersion, StrictVersion
     from distutils.spawn import find_executable
     import re

@@ -421,7 +421,7 @@
         out.close()
         result = re.search('(\d+\.\d+(\.\d+)*)',out_string)
         if result:
-            ld_version = StrictVersion(result.group(1))
+            ld_version = LooseVersion(result.group(1))
         else:
             ld_version = None
     else:
@@ -433,7 +433,7 @@
         out.close()
         result = re.search(' (\d+\.\d+(\.\d+)*)',out_string)
         if result:
-            dllwrap_version = StrictVersion(result.group(1))
+            dllwrap_version = LooseVersion(result.group(1))
         else:
             dllwrap_version = None
History
Date User Action Args
2008-10-22 13:17:55zookosetrecipients: + zooko
2008-10-22 13:17:55zookosetmessageid: <1224681475.69.0.42802955697.issue4172@psf.upfronthosting.co.za>
2008-10-22 13:17:54zookolinkissue4172 messages
2008-10-22 13:17:53zookocreate