From 12471d63893f84cb88deccf83af5aa5c6866c275 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 20 Feb 2003 02:11:43 +0000 Subject: [PATCH] Don't use self.announce() in a function that's not a method. Use level=3 (i.e. log.WARN) for the warnings about failed imports. (Hmm... Why is that code in an "if 1: ..."? What's the else branch for?) --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 3217033bd1..ed6a9bedc4 100644 --- a/setup.py +++ b/setup.py @@ -88,7 +88,7 @@ def find_module_file(module, dirlist): if not list: return module if len(list) > 1: - self.announce("WARNING: multiple copies of %s found"%module) + log.info("WARNING: multiple copies of %s found"%module) return os.path.join(list[0], module) class PyBuildExt(build_ext): @@ -211,7 +211,7 @@ class PyBuildExt(build_ext): if 1: self.announce('*** WARNING: renaming "%s" since importing it' - ' failed: %s' % (ext.name, why)) + ' failed: %s' % (ext.name, why), level=3) assert not self.inplace basename, tail = os.path.splitext(ext_filename) newname = basename + "_failed" + tail @@ -231,7 +231,7 @@ class PyBuildExt(build_ext): self.announce('unable to remove files (ignored)') else: self.announce('*** WARNING: importing extension "%s" ' - 'failed: %s' % (ext.name, why)) + 'failed: %s' % (ext.name, why), level=3) def get_platform (self): # Get value of sys.platform -- 2.40.0