[pypy-svn] r64381 - in pypy/trunk: ctypes_configure pypy/lib
iko at codespeak.net
iko at codespeak.net
Sun Apr 19 16:55:30 CEST 2009
Author: iko
Date: Sun Apr 19 16:55:30 2009
New Revision: 64381
Modified:
pypy/trunk/ctypes_configure/configure.py
pypy/trunk/pypy/lib/_locale.py
Log:
Don't print random junk when looking for compiler configuration in _locale
Modified: pypy/trunk/ctypes_configure/configure.py
==============================================================================
--- pypy/trunk/ctypes_configure/configure.py (original)
+++ pypy/trunk/ctypes_configure/configure.py Sun Apr 19 16:55:30 2009
@@ -151,7 +151,7 @@
return try_compile([self.path], eci)
-def configure(CConfig):
+def configure(CConfig, noerr=False):
"""Examine the local system by running the C compiler.
The CConfig class contains CConfigEntry attribues that describe
what should be inspected; configure() returns a dict mapping
@@ -179,7 +179,7 @@
writer.close()
eci = CConfig._compilation_info_
- infolist = list(run_example_code(writer.path, eci))
+ infolist = list(run_example_code(writer.path, eci, noerr=noerr))
assert len(infolist) == len(entries)
resultinfo = {}
@@ -569,8 +569,8 @@
}
"""
-def run_example_code(filepath, eci):
- executable = build_executable([filepath], eci)
+def run_example_code(filepath, eci, noerr=False):
+ executable = build_executable([filepath], eci, noerr=noerr)
output = py.process.cmdexec(executable)
section = None
for line in output.splitlines():
Modified: pypy/trunk/pypy/lib/_locale.py
==============================================================================
--- pypy/trunk/pypy/lib/_locale.py (original)
+++ pypy/trunk/pypy/lib/_locale.py Sun Apr 19 16:55:30 2009
@@ -37,7 +37,7 @@
setattr(LocaleConfigure, key, ConstantInteger(key))
try:
- locale_config = configure(LocaleConfigure)
+ locale_config = configure(LocaleConfigure, noerr=True)
except Exception, e:
# should probably be moved into configure()
# as an optional feature
More information about the Pypy-commit
mailing list