New submission from Oliver Jeeves <ojee...@gmail.com>: When trying to build a python package for distribution, compile errors are always ignored. The setup function will return successfully even if it was unable to compile some modules due to, for example, indentation errors.
The specific situation I'm trying to deal with, is a script that builds a large number of eggs, and trying to detect if something went wrong. I see that this has been raised as a bug for setuptools: http://bugs.python.org/setuptools/issue61 But it's not considered an issue because it's how distutils works. distutils.util.byte_compile calls py_compile.compile, but does not pass a doraise argument to it. The only suggestion for how to get tools that use distutils.util.byte_compile (like setuptools.setup and distutils.core.setup) to exit on an error is to monkey patch py_compile.compile to change its default doraise argument to True. That suggestion came from here: http://stackoverflow.com/questions/2230843/how-can-i-detect-errors-programatically-when-building-an-egg-with-setuptools supressing compile errors when making a distribution seems like a bug to me, but just having the option to easily change this behaviour would be great. ---------- assignee: tarek components: Distutils messages: 99273 nosy: Oliver.Jeeves, tarek severity: normal status: open title: distutils always ignores compile errors type: feature request versions: Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7918> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com