summaryrefslogtreecommitdiff
path: root/Lib/distutils/core.py
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2002-06-04 20:14:43 +0000
committerJeremy Hylton <jeremy@alum.mit.edu>2002-06-04 20:14:43 +0000
commitcd8a1148e19116db109f27d26c02e1de536dc76e (patch)
treee3969bc16f8ef0c540f1d0e72fb0da711344d758 /Lib/distutils/core.py
parent6fa82a34775576b90c8ec38e8968dfbb0b02e11d (diff)
downloadcpython-git-cd8a1148e19116db109f27d26c02e1de536dc76e.tar.gz
Make setup.py less chatty by default.
This is a conservative version of SF patch 504889. It uses the log module instead of calling print in various places, and it ignores the verbose argument passed to many functions and set as an attribute on some objects. Instead, it uses the verbosity set on the logger via the command line. The log module is now preferred over announce() and warn() methods that exist only for backwards compatibility. XXX This checkin changes a lot of modules that have no test suite and aren't exercised by the Python build process. It will need substantial testing.
Diffstat (limited to 'Lib/distutils/core.py')
-rw-r--r--Lib/distutils/core.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py
index 97a741c812..222e6aebd8 100644
--- a/Lib/distutils/core.py
+++ b/Lib/distutils/core.py
@@ -100,7 +100,11 @@ def setup (**attrs):
try:
_setup_distribution = dist = klass(attrs)
except DistutilsSetupError, msg:
- raise SystemExit, "error in setup script: %s" % msg
+ if attrs.has_key('name'):
+ raise SystemExit, "error in %s setup command: %s" % \
+ (attrs['name'], msg)
+ else:
+ raise SystemExit, "error in setup command: %s" % msg
if _setup_stop_after == "init":
return dist