[pypy-svn] r64195 - pypy/trunk/pypy/translator/platform
afa at codespeak.net
afa at codespeak.net
Thu Apr 16 23:02:17 CEST 2009
Author: afa
Date: Thu Apr 16 23:02:16 2009
New Revision: 64195
Modified:
pypy/trunk/pypy/translator/platform/windows.py
Log:
Tweaks for translation on Windows:
- the last item of PATH did not work because of a trailing \r
- My French version of Visual Studio displays the version differently
Modified: pypy/trunk/pypy/translator/platform/windows.py
==============================================================================
--- pypy/trunk/pypy/translator/platform/windows.py (original)
+++ pypy/trunk/pypy/translator/platform/windows.py Thu Apr 16 23:02:16 2009
@@ -29,6 +29,8 @@
return
env = {}
+
+ stdout = stdout.replace("\r\n", "\n")
for line in stdout.split("\n"):
if '=' not in line:
continue
@@ -87,7 +89,7 @@
# detect version of current compiler
returncode, stdout, stderr = _run_subprocess(self.cc, '',
env=self.c_environ)
- r = re.search('Version ([0-9]+)\.([0-9]+)', stderr)
+ r = re.search('[Vv]ersion\W([0-9]+)\.([0-9]+)', stderr)
if r is not None:
self.version = int(''.join(r.groups())) / 10 - 60
else:
More information about the Pypy-commit
mailing list