from setuptools import setup
import py_compile
orig_py_compile = py_compile.compile

def doraise_py_compile(file, cfile=None, dfile=None, doraise=False):
    pass
How can I detect errors programatically when building an egg with setuptools?