summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-08-18 19:23:47 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-08-18 19:23:47 (GMT)
commit351ffb80c3fffc2996cc320fd9e0eaf3778eba25 (patch)
tree68cae3a2d1cb3725df982beb86b69dbc0b4da5d6
parent26f521668a52d233597c713fd20a294437ad1c26 (diff)
downloadcpython-351ffb80c3fffc2996cc320fd9e0eaf3778eba25.zip
cpython-351ffb80c3fffc2996cc320fd9e0eaf3778eba25.tar.gz
cpython-351ffb80c3fffc2996cc320fd9e0eaf3778eba25.tar.bz2
#2234 distutils failed with mingw binutils 2.18.50.20080109.
Be less strict when parsing these version numbers, they don't necessarily follow the python numbering scheme.
-rw-r--r--Lib/distutils/cygwinccompiler.py8
-rw-r--r--Misc/NEWS4
2 files changed, 8 insertions, 4 deletions
diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
index 4ac11eb..94a7bd9 100644
--- a/Lib/distutils/cygwinccompiler.py
+++ b/Lib/distutils/cygwinccompiler.py
@@ -404,7 +404,7 @@ def get_versions():
""" 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
from distutils.spawn import find_executable
import re
@@ -415,7 +415,7 @@ def get_versions():
out.close()
result = re.search('(\d+\.\d+(\.\d+)*)',out_string)
if result:
- gcc_version = StrictVersion(result.group(1))
+ gcc_version = LooseVersion(result.group(1))
else:
gcc_version = None
else:
@@ -427,7 +427,7 @@ def get_versions():
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:
@@ -439,7 +439,7 @@ def get_versions():
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
else:
diff --git a/Misc/NEWS b/Misc/NEWS
index 7a0838e..1792d76 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -48,6 +48,10 @@ Core and Builtins
Library
-------
+- Issue #2234: distutils failed for some versions of the cygwin compiler. The
+ version reported by these tools does not necessarily follow the python
+ version numbering scheme, so the module is less strict when parsing it.
+
- Issue #2235: Added Py3k warnings for types which will become unhashable
under the stricter __hash__ inheritance rules in 3.0. Several types
which did not meet the rules for hash invariants and were already