Issue3013
Created on 2008-05-30 21:33 by jameinel, last changed 2008-06-12 06:02 by georg.brandl.
| File name |
Uploaded |
Description |
Edit |
Remove |
|
cygwinccompiler.diff
|
jameinel,
2008-05-30 21:58
|
Patch changing regex |
|
|
|
msg67557 - (view) |
Author: John Arbash Meinel (jameinel) |
Date: 2008-05-30 21:33 |
|
I just upgraded my cygwin installation to the latest versions. Which
seems to include
GNU ld (GNU Binutils) 2.18.50.20080523
and
GNU dllwrap (GNU Binutils) 2.18.50.20080523
It seems that their version notation is now Major.Minor.Micro.Date
The problem is that in 'cygwincompiler.py' it does:
result = re.search('(\d+\.\d+(\.\d+)*)',out_string)
if result:
ld_version = StrictVersion(result.group(1))
Which matches the full version string. However "StrictVersion" only
supports A.B.CdE formats. So the .Date breaks the parser.
My workaround was to change the regex to be:
result = re.search('(\d+\.\d+(\.\d+)?)(\.\d+)*',out_string)
So it will still match an unlimited number of '.DDD' as it used to, but
now it only preserves the first 3 to pass to StrictVersion.
This may not be the correct fix, as a better fix might be to use
something else instead of StrictVersion (since these version numbers
explicitly *don't* match what StrictVersion expects.)
|
|
msg67561 - (view) |
Author: John Arbash Meinel (jameinel) |
Date: 2008-05-30 21:58 |
|
Quick patch that changes the regex
|
|
msg67641 - (view) |
Author: Georg Brandl (georg.brandl) |
Date: 2008-06-02 22:02 |
|
Do you need the (\.\d+)* trailer in the regex at all?
|
|
msg67643 - (view) |
Author: John Arbash Meinel (jameinel) |
Date: 2008-06-02 22:14 |
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Georg Brandl wrote:
| Georg Brandl <georg@python.org> added the comment:
|
| Do you need the (\.\d+)* trailer in the regex at all?
|
| ----------
| nosy: +georg.brandl
Not sure. The actual revision is:
2.18.50.20080523
The code used to allow lots of version numbers, and I didn't know if we wanted
to require that or not.
Certainly just changing * => ? is a simpler fix. And since we don't end with $
or anything, it should still match.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkhEcLUACgkQJdeBCYSNAAPO8ACggCAEx1HWnfv3FD1KAnvyGzKg
tbwAn3D6xKEbQkHWrP1dKaO4tSsE6Ito
=DpMW
-----END PGP SIGNATURE-----
|
|
msg67927 - (view) |
Author: Benjamin Peterson (benjamin.peterson) |
Date: 2008-06-10 21:26 |
|
This seems to be the same as #2234.
|
|
| Date |
User |
Action |
Args |
| 2008-06-12 06:02:04 | georg.brandl | set | status: open -> closed resolution: duplicate |
| 2008-06-10 21:26:11 | benjamin.peterson | set | nosy:
+ benjamin.peterson superseder: cygwinccompiler.py fails for latest MinGW releases. messages:
+ msg67927 |
| 2008-06-02 22:14:30 | jameinel | set | messages:
+ msg67643 |
| 2008-06-02 22:02:48 | georg.brandl | set | nosy:
+ georg.brandl messages:
+ msg67641 |
| 2008-05-30 21:58:40 | jameinel | set | files:
+ cygwinccompiler.diff keywords:
+ patch messages:
+ msg67561 |
| 2008-05-30 21:50:53 | benjamin.peterson | set | priority: high keywords:
+ easy |
| 2008-05-30 21:34:06 | jameinel | set | components:
+ Distutils |
| 2008-05-30 21:33:54 | jameinel | create | |
|