Kaydet (Commit) 351ffb80 authored tarafından Amaury Forgeot d'Arc's avatar Amaury Forgeot d'Arc

#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.
üst 26f52166
...@@ -404,7 +404,7 @@ def get_versions(): ...@@ -404,7 +404,7 @@ def get_versions():
""" Try to find out the versions of gcc, ld and dllwrap. """ Try to find out the versions of gcc, ld and dllwrap.
If not possible it returns None for it. If not possible it returns None for it.
""" """
from distutils.version import StrictVersion from distutils.version import LooseVersion
from distutils.spawn import find_executable from distutils.spawn import find_executable
import re import re
...@@ -415,7 +415,7 @@ def get_versions(): ...@@ -415,7 +415,7 @@ def get_versions():
out.close() out.close()
result = re.search('(\d+\.\d+(\.\d+)*)',out_string) result = re.search('(\d+\.\d+(\.\d+)*)',out_string)
if result: if result:
gcc_version = StrictVersion(result.group(1)) gcc_version = LooseVersion(result.group(1))
else: else:
gcc_version = None gcc_version = None
else: else:
...@@ -427,7 +427,7 @@ def get_versions(): ...@@ -427,7 +427,7 @@ def get_versions():
out.close() out.close()
result = re.search('(\d+\.\d+(\.\d+)*)',out_string) result = re.search('(\d+\.\d+(\.\d+)*)',out_string)
if result: if result:
ld_version = StrictVersion(result.group(1)) ld_version = LooseVersion(result.group(1))
else: else:
ld_version = None ld_version = None
else: else:
...@@ -439,7 +439,7 @@ def get_versions(): ...@@ -439,7 +439,7 @@ def get_versions():
out.close() out.close()
result = re.search(' (\d+\.\d+(\.\d+)*)',out_string) result = re.search(' (\d+\.\d+(\.\d+)*)',out_string)
if result: if result:
dllwrap_version = StrictVersion(result.group(1)) dllwrap_version = LooseVersion(result.group(1))
else: else:
dllwrap_version = None dllwrap_version = None
else: else:
......
...@@ -48,6 +48,10 @@ Core and Builtins ...@@ -48,6 +48,10 @@ Core and Builtins
Library 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 - Issue #2235: Added Py3k warnings for types which will become unhashable
under the stricter __hash__ inheritance rules in 3.0. Several types under the stricter __hash__ inheritance rules in 3.0. Several types
which did not meet the rules for hash invariants and were already which did not meet the rules for hash invariants and were already
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment