From cd8a1148e19116db109f27d26c02e1de536dc76e Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Tue, 4 Jun 2002 20:14:43 +0000 Subject: 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. --- Lib/distutils/bcppcompiler.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Lib/distutils/bcppcompiler.py') diff --git a/Lib/distutils/bcppcompiler.py b/Lib/distutils/bcppcompiler.py index 9ebba2d85b4..019244cd16c 100644 --- a/Lib/distutils/bcppcompiler.py +++ b/Lib/distutils/bcppcompiler.py @@ -22,6 +22,7 @@ from distutils.ccompiler import \ CCompiler, gen_preprocess_options, gen_lib_options from distutils.file_util import write_file from distutils.dep_util import newer +from distutils import log class BCPPCompiler(CCompiler) : """Concrete class that implements an interface to the Borland C/C++ @@ -108,7 +109,7 @@ class BCPPCompiler(CCompiler) : ext = (os.path.splitext (src))[1] if skip_sources[src]: - self.announce ("skipping %s (%s up-to-date)" % (src, obj)) + log.debug("skipping %s (%s up-to-date)", src, obj) else: src = os.path.normpath(src) obj = os.path.normpath(obj) @@ -178,7 +179,7 @@ class BCPPCompiler(CCompiler) : except DistutilsExecError, msg: raise LibError, msg else: - self.announce ("skipping %s (up-to-date)" % output_filename) + log.debug("skipping %s (up-to-date)", output_filename) # create_static_lib () @@ -205,8 +206,8 @@ class BCPPCompiler(CCompiler) : self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) if runtime_library_dirs: - self.warn ("I don't know what to do with 'runtime_library_dirs': " - + str (runtime_library_dirs)) + log.warn("I don't know what to do with 'runtime_library_dirs': %s", + str(runtime_library_dirs)) if output_dir is not None: output_filename = os.path.join (output_dir, output_filename) @@ -285,7 +286,6 @@ class BCPPCompiler(CCompiler) : if libfile is None: ld_args.append(lib) # probably a BCPP internal library -- don't warn - # self.warn('library %s not found.' % lib) else: # full name which prefers bcpp_xxx.lib over xxx.lib ld_args.append(libfile) @@ -313,7 +313,7 @@ class BCPPCompiler(CCompiler) : raise LinkError, msg else: - self.announce ("skipping %s (up-to-date)" % output_filename) + log.debug("skipping %s (up-to-date)", output_filename) # link () -- cgit v1.2.3