[pypy-svn] r7442 - pypy/trunk/src/pypy/translator/tool
tismer at codespeak.net
tismer at codespeak.net
Fri Nov 19 15:17:55 CET 2004
Author: tismer
Date: Fri Nov 19 15:17:55 2004
New Revision: 7442
Modified:
pypy/trunk/src/pypy/translator/tool/buildpyxmodule.py
Log:
fixed enable_fast_compilation: 'OPT' does not have to exist
Modified: pypy/trunk/src/pypy/translator/tool/buildpyxmodule.py
==============================================================================
--- pypy/trunk/src/pypy/translator/tool/buildpyxmodule.py (original)
+++ pypy/trunk/src/pypy/translator/tool/buildpyxmodule.py Fri Nov 19 15:17:55 2004
@@ -27,9 +27,13 @@
def enable_fast_compilation():
from distutils import sysconfig
- opt = sysconfig.get_config_vars()['OPT']
- opt = re.sub('-O.', '-O0', opt)
- sysconfig.get_config_vars()['OPT'] = opt
+ gcv = sysconfig.get_config_vars()
+ opt = gcv.get('OPT') # not always existent
+ if opt:
+ opt = re.sub('-O.', '-O0', opt)
+ else:
+ opt = '-O0'
+ gcv['OPT'] = opt
def make_module_from_c(cfile):
from distutils.core import setup
More information about the Pypy-commit
mailing list