The following patch makes Lib/platform.py correctly parse the
sys.version string for FePy 1.0 and 1.0.1. It would be good if it
could be added to IPCE - then pybench will work.
--- platform.py 2006-12-05 21:25:22.000000000 +1100
+++ /usr/lib/python2.5/platform.py 2006-10-07 01:23:11.000000000 +1000
@@ -1095,9 +1095,6 @@
_sys_version_parser = re.compile(r'([\w.+]+)\s*'
'\(#?([^,]+),\s*([\w ]+),\s*([\w :]+)\)\s*'
'\[([^\]]+)\]?')
-_ipy_sys_version_parser = re.compile(r'IronPython\s*'
- '([\d\.]+)'
- ' on (.NET [\d\.]+)')
_sys_version_cache = None
def _sys_version():
@@ -1116,14 +1113,8 @@
if _sys_version_cache is not None:
return _sys_version_cache
- match = _sys_version_parser.match(sys.version)
- if match:
- version, buildno, builddate, buildtime, compiler = match.groups()
- elif sys.version[:10] == "IronPython":
- match = _ipy_sys_version_parser.match(sys.version)
- version, compiler = match.groups()
- buildno = 0
- builddate = buildtime = '?'
+ version, buildno, builddate, buildtime, compiler = \
+ _sys_version_parser.match(sys.version).groups()
builddate = builddate + ' ' + buildtime
l = string.split(version, '.')
if len(l) == 2:
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com