diff Lib/distutils/command/install_scripts.py @ 23668:ca87119255eb legacy-trunk

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.
author Jeremy Hylton <jeremy@alum.mit.edu>
date Tue, 04 Jun 2002 20:14:43 +0000
parents 9e384f103047
children edc423940cd6
line wrap: on
line diff
--- a/Lib/distutils/command/install_scripts.py	Tue Jun 04 20:00:26 2002 +0000
+++ b/Lib/distutils/command/install_scripts.py	Tue Jun 04 20:14:43 2002 +0000
@@ -9,6 +9,7 @@
 
 import os
 from distutils.core import Command
+from distutils import log
 from stat import ST_MODE
 
 class install_scripts (Command):
@@ -48,10 +49,10 @@
             # all the scripts we just installed.
             for file in self.get_outputs():
                 if self.dry_run:
-                    self.announce("changing mode of %s" % file)
+                    log.info("changing mode of %s to %o", file, mode)
                 else:
                     mode = ((os.stat(file)[ST_MODE]) | 0111) & 07777
-                    self.announce("changing mode of %s to %o" % (file, mode))
+                    log.info("changing mode of %s to %o", file, mode)
                     os.chmod(file, mode)
 
     def get_inputs (self):