summaryrefslogtreecommitdiff
path: root/distutils2/compiler
diff options
context:
space:
mode:
author?ric Araujo <merwok@netwok.org>2011-02-10 01:48:09 +0100
committer?ric Araujo <merwok@netwok.org>2011-02-10 01:48:09 +0100
commit0d8fcc59e85ef42479dea9128bb051aca9dade14 (patch)
tree69b6f82e1cb09f9bfb57cdf9dacc6450edd12273 /distutils2/compiler
parent37d72aef1b216abd0840afd73c114bad25621a39 (diff)
downloaddisutils2-0d8fcc59e85ef42479dea9128bb051aca9dade14.tar.gz
More logging tweaks: use real warning method, merge some calls.
Diffstat (limited to 'distutils2/compiler')
-rw-r--r--distutils2/compiler/bcppcompiler.py5
-rw-r--r--distutils2/compiler/ccompiler.py2
-rw-r--r--distutils2/compiler/msvccompiler.py9
-rw-r--r--distutils2/compiler/unixccompiler.py6
4 files changed, 11 insertions, 11 deletions
diff --git a/distutils2/compiler/bcppcompiler.py b/distutils2/compiler/bcppcompiler.py
index dbf287e..0e7c4e7 100644
--- a/distutils2/compiler/bcppcompiler.py
+++ b/distutils2/compiler/bcppcompiler.py
@@ -191,9 +191,8 @@ class BCPPCompiler(CCompiler) :
self._fix_lib_args (libraries, library_dirs, runtime_library_dirs)
if runtime_library_dirs:
- logger.warning(("I don't know what to do with "
- "'runtime_library_dirs': %s"),
- str(runtime_library_dirs))
+ logger.warning("I don't know what to do with "
+ "'runtime_library_dirs': %r", runtime_library_dirs)
if output_dir is not None:
output_filename = os.path.join (output_dir, output_filename)
diff --git a/distutils2/compiler/ccompiler.py b/distutils2/compiler/ccompiler.py
index 4067518..10702f7 100644
--- a/distutils2/compiler/ccompiler.py
+++ b/distutils2/compiler/ccompiler.py
@@ -850,6 +850,7 @@ main (int argc, char **argv) {
# -- Utility methods -----------------------------------------------
+ # TODO use logging.info
def announce(self, msg, level=None):
logger.debug(msg)
@@ -858,6 +859,7 @@ main (int argc, char **argv) {
if DEBUG:
print msg
+ # TODO use logging.warn
def warn(self, msg):
sys.stderr.write("warning: %s\n" % msg)
diff --git a/distutils2/compiler/msvccompiler.py b/distutils2/compiler/msvccompiler.py
index df1efd5..046c364 100644
--- a/distutils2/compiler/msvccompiler.py
+++ b/distutils2/compiler/msvccompiler.py
@@ -44,11 +44,10 @@ except ImportError:
RegError = win32api.error
except ImportError:
- logger.info("Warning: Can't read registry to find the "
- "necessary compiler setting\n"
- "Make sure that Python modules _winreg, "
- "win32api or win32con are installed.")
- pass
+ logger.warning(
+ "Can't read registry to find the necessary compiler setting;\n"
+ "make sure that Python modules _winreg, win32api or win32con "
+ "are installed.")
if _can_read_reg:
HKEYS = (hkey_mod.HKEY_USERS,
diff --git a/distutils2/compiler/unixccompiler.py b/distutils2/compiler/unixccompiler.py
index 555b77b..4c359f9 100644
--- a/distutils2/compiler/unixccompiler.py
+++ b/distutils2/compiler/unixccompiler.py
@@ -98,9 +98,9 @@ def _darwin_compiler_fixup(compiler_so, cc_args):
sysroot = compiler_so[idx+1]
if sysroot and not os.path.isdir(sysroot):
- logger.warning("Compiling with an SDK that doesn't seem to exist: %s",
- sysroot)
- logger.warning("Please check your Xcode installation")
+ logger.warning(
+ "Compiling with an SDK that doesn't seem to exist: %r;\n"
+ "please check your Xcode installation", sysroot)
return compiler_so