[Distutils] [issue61] bdist_egg command doesn't stop after byte-compile errors

Miroslav Madecki setuptools at bugs.python.org
Mon Feb 23 22:28:38 CET 2009

New submission from Miroslav Madecki <miro at a-bb.net>:

I'm using setuptools 06c9 on CentOs 5.X i386/x86_64.

When using bdist_egg command one would expect setuptools to stop
once byte-compile encounters an error
(e.g. python source file with syntax errors) and would also return
exit value other than 0 indicating a failure.

Unfortunately neither is the case so if you use setuptools within makefiles
it won't stop make in the case of errors.

I'm surprised that nobody else reported this issue.

Example is attached below.


[miro at t42 monty]$ python25 ipdrfc-setup.py bdist_egg
byte-compiling build/bdist.linux-i686/egg/abn/ipdrfc/cfg.py to cfg.pyc
  File "build/bdist.linux-i686/egg/abn/ipdrfc/cfg.py", line 184
    defset_exporter(ipAddr, cfg, RexGroup=None, RexListenPort=None, LogLevel=None):
SyntaxError: invalid syntax

byte-compiling build/bdist.linux-i686/egg/abn/ipdrfc/reader.py to reader.pyc
byte-compiling build/bdist.linux-i686/egg/abn/ipdrfc/sshconsole.py to sshconsole.pyc
byte-compiling build/bdist.linux-i686/egg/abn/ipdrfc/backup.py to backup.pyc
creating build/bdist.linux-i686/egg/EGG-INFO
copying src/abn_ipdrfc.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying src/abn_ipdrfc.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying src/abn_ipdrfc.egg-info/dependency_links.txt ->
copying src/abn_ipdrfc.egg-info/namespace_packages.txt ->
copying src/abn_ipdrfc.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/abn_ipdrfc-3.2.0-py2.5.egg' and adding
'build/bdist.linux-i686/egg' to it
removing 'build/bdist.linux-i686/egg' (and everything under it)
[miro at t42 monty]$ echo $?

messages: 243
nosy: miro
priority: urgent
status: unread
title: bdist_egg command doesn't stop after byte-compile errors

Setuptools tracker <setuptools at bugs.python.org>

More information about the Distutils-SIG mailing list