Catch DistutilSetupError from the Distribution constructor.

This commit is contained in:
Greg Ward 2000-06-03 01:02:06 +00:00
parent 82d71cacb0
commit 3985151642
1 changed files with 4 additions and 1 deletions

View File

@ -80,7 +80,10 @@ class found in 'cmdclass' is used in place of the default, which is
# Create the Distribution instance, using the remaining arguments
# (ie. everything except distclass) to initialize it
dist = klass (attrs)
try:
dist = klass (attrs)
except DistutilsSetupError, msg:
raise SystemExit, "error in setup script: %s" % msg
# Find and parse the config file(s): they will override options from
# the setup script, but be overridden by the command line.