summaryrefslogtreecommitdiffstats
path: root/Lib/distutils
diff options
context:
space:
mode:
authorJason Tishler <jason@tishler.net>2003-04-09 20:13:59 (GMT)
committerJason Tishler <jason@tishler.net>2003-04-09 20:13:59 (GMT)
commitdcae0dc4ed77ca6a46a571a18ce57696df5566ec (patch)
tree8383fef07e41a501093d36e7270b1de07e5aa78b /Lib/distutils
parent11d204ca277a3991c429169eff2e9ef0b02b9c35 (diff)
downloadcpython-dcae0dc4ed77ca6a46a571a18ce57696df5566ec.zip
cpython-dcae0dc4ed77ca6a46a571a18ce57696df5566ec.tar.gz
cpython-dcae0dc4ed77ca6a46a571a18ce57696df5566ec.tar.bz2
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.
Diffstat (limited to 'Lib/distutils')
-rw-r--r--Lib/distutils/cygwinccompiler.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
index e86dc81..794dcdb 100644
--- a/Lib/distutils/cygwinccompiler.py
+++ b/Lib/distutils/cygwinccompiler.py
@@ -357,7 +357,7 @@ def get_versions():
out = os.popen(gcc_exe + ' -dumpversion','r')
out_string = out.read()
out.close()
- result = re.search('(\d+\.\d+\.\d+)',out_string)
+ result = re.search('(\d+\.\d+(\.\d+)*)',out_string)
if result:
gcc_version = StrictVersion(result.group(1))
else:
@@ -369,7 +369,7 @@ def get_versions():
out = os.popen(ld_exe + ' -v','r')
out_string = out.read()
out.close()
- result = re.search('(\d+\.\d+\.\d+)',out_string)
+ result = re.search('(\d+\.\d+(\.\d+)*)',out_string)
if result:
ld_version = StrictVersion(result.group(1))
else:
@@ -381,7 +381,7 @@ def get_versions():
out = os.popen(dllwrap_exe + ' --version','r')
out_string = out.read()
out.close()
- result = re.search(' (\d+\.\d+\.\d+)',out_string)
+ result = re.search(' (\d+\.\d+(\.\d+)*)',out_string)
if result:
dllwrap_version = StrictVersion(result.group(1))
else: