=== modified file 'twisted/python/dist.py' --- twisted/python/dist.py 2009-04-14 11:03:09 +0000 +++ twisted/python/dist.py 2010-04-24 15:48:09 +0000 @@ -8,7 +8,7 @@ import sys, os from distutils.command import build_scripts, install_data, build_ext, build_py -from distutils.errors import CompileError +from distutils.errors import CompileError, CCompilerError from distutils import core from distutils.core import Extension @@ -296,6 +296,13 @@ +# The technique of ignoring CCompilerError is copied from simplejson 2.1.1. +BUILD_EXT_WARNING=""" +WARNING: The C extension could not be compiled, speedups are not enabled. + +Above is the output showing how the compilation failed. +""" + class build_ext_twisted(build_ext.build_ext): """ Allow subclasses to easily detect and customize Extensions to @@ -325,8 +332,12 @@ Check to see which extension modules to build and then build them. """ self.prepare_extensions() - build_ext.build_ext.build_extensions(self) - + try: + build_ext.build_ext.build_extensions(self) + except CCompilerError, x: + print ('*'*70+'\n') + print BUILD_EXT_WARNING + print ('*'*70+'\n') def _remove_conftest(self): for filename in ("conftest.c", "conftest.o", "conftest.obj"):