mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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?)
This commit is contained in:
parent
af16065918
commit
12471d6389
1 changed files with 3 additions and 3 deletions
6
setup.py
6
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue