diff options
Diffstat (limited to 'distutils2/compiler')
| -rw-r--r-- | distutils2/compiler/bcppcompiler.py | 9 | ||||
| -rw-r--r-- | distutils2/compiler/ccompiler.py | 11 | ||||
| -rw-r--r-- | distutils2/compiler/msvc9compiler.py | 18 | ||||
| -rw-r--r-- | distutils2/compiler/msvccompiler.py | 10 | ||||
| -rw-r--r-- | distutils2/compiler/unixccompiler.py | 10 |
5 files changed, 30 insertions, 28 deletions
diff --git a/distutils2/compiler/bcppcompiler.py b/distutils2/compiler/bcppcompiler.py index 115b71b..929994b 100644 --- a/distutils2/compiler/bcppcompiler.py +++ b/distutils2/compiler/bcppcompiler.py @@ -19,7 +19,7 @@ from distutils2.errors import (DistutilsExecError, CompileError, LibError, from distutils2.compiler.ccompiler import CCompiler, gen_preprocess_options from distutils2.file_util import write_file from distutils2.dep_util import newer -from distutils2 import log +from distutils2 import logger class BCPPCompiler(CCompiler) : """Concrete class that implements an interface to the Borland C/C++ @@ -162,7 +162,7 @@ class BCPPCompiler(CCompiler) : except DistutilsExecError, msg: raise LibError, msg else: - log.debug("skipping %s (up-to-date)", output_filename) + logger.debug("skipping %s (up-to-date)", output_filename) # create_static_lib () @@ -190,7 +190,8 @@ class BCPPCompiler(CCompiler) : self._fix_lib_args (libraries, library_dirs, runtime_library_dirs) if runtime_library_dirs: - log.warn("I don't know what to do with 'runtime_library_dirs': %s", + logger.warning(("I don't know what to do with " + "'runtime_library_dirs': %s"), str(runtime_library_dirs)) if output_dir is not None: @@ -297,7 +298,7 @@ class BCPPCompiler(CCompiler) : raise LinkError, msg else: - log.debug("skipping %s (up-to-date)", output_filename) + logger.debug("skipping %s (up-to-date)", output_filename) # link () diff --git a/distutils2/compiler/ccompiler.py b/distutils2/compiler/ccompiler.py index da7e061..744b596 100644 --- a/distutils2/compiler/ccompiler.py +++ b/distutils2/compiler/ccompiler.py @@ -7,12 +7,13 @@ for the Distutils compiler abstraction model.""" import sys import os import re +from shutil import move from distutils2.errors import (CompileError, LinkError, UnknownFileError, DistutilsPlatformError, DistutilsModuleError) from distutils2.util import split_quoted, execute, newer_group, spawn -from distutils2 import log -from shutil import move +from distutils2 import logger + try: import sysconfig @@ -911,8 +912,8 @@ main (int argc, char **argv) { # -- Utility methods ----------------------------------------------- - def announce(self, msg, level=1): - log.debug(msg) + def announce(self, msg, level=None): + logger.debug(msg) def debug_print(self, msg): from distutils2.debug import DEBUG @@ -940,7 +941,7 @@ main (int argc, char **argv) { if self.dry_run: head = '' for part in name.split(os.sep): - log.info("created directory %s%s", head, part) + logger.info("created directory %s%s", head, part) head += part + os.sep return os.makedirs(name, mode) diff --git a/distutils2/compiler/msvc9compiler.py b/distutils2/compiler/msvc9compiler.py index 2f42a65..63a5570 100644 --- a/distutils2/compiler/msvc9compiler.py +++ b/distutils2/compiler/msvc9compiler.py @@ -21,7 +21,7 @@ import re from distutils2.errors import (DistutilsExecError, DistutilsPlatformError, CompileError, LibError, LinkError) from distutils2.compiler.ccompiler import CCompiler, gen_lib_options -from distutils2 import log +from distutils2 import logger from distutils2.util import get_platform import _winreg @@ -215,7 +215,7 @@ def find_vcvarsall(version): productdir = Reg.get_value(r"%s\Setup\VC" % vsbase, "productdir") except KeyError: - log.debug("Unable to find productdir in registry") + logger.debug("Unable to find productdir in registry") productdir = None if not productdir or not os.path.isdir(productdir): @@ -226,17 +226,17 @@ def find_vcvarsall(version): productdir = os.path.join(toolsdir, os.pardir, os.pardir, "VC") productdir = os.path.abspath(productdir) if not os.path.isdir(productdir): - log.debug("%s is not a valid directory" % productdir) + logger.debug("%s is not a valid directory" % productdir) return None else: - log.debug("Env var %s is not set or invalid" % toolskey) + logger.debug("Env var %s is not set or invalid" % toolskey) if not productdir: - log.debug("No productdir found") + logger.debug("No productdir found") return None vcvarsall = os.path.join(productdir, "vcvarsall.bat") if os.path.isfile(vcvarsall): return vcvarsall - log.debug("Unable to find vcvarsall.bat") + logger.debug("Unable to find vcvarsall.bat") return None def query_vcvarsall(version, arch="x86"): @@ -248,7 +248,7 @@ def query_vcvarsall(version, arch="x86"): if vcvarsall is None: raise DistutilsPlatformError("Unable to find vcvarsall.bat") - log.debug("Calling 'vcvarsall.bat %s' (version=%s)", arch, version) + logger.debug("Calling 'vcvarsall.bat %s' (version=%s)", arch, version) popen = subprocess.Popen('"%s" %s & set' % (vcvarsall, arch), stdout=subprocess.PIPE, stderr=subprocess.PIPE) @@ -547,7 +547,7 @@ class MSVCCompiler(CCompiler) : except DistutilsExecError, msg: raise LibError(msg) else: - log.debug("skipping %s (up-to-date)", output_filename) + logger.debug("skipping %s (up-to-date)", output_filename) def link(self, @@ -653,7 +653,7 @@ class MSVCCompiler(CCompiler) : except DistutilsExecError, msg: raise LinkError(msg) else: - log.debug("skipping %s (up-to-date)", output_filename) + logger.debug("skipping %s (up-to-date)", output_filename) def _remove_visual_c_ref(self, manifest_file): try: diff --git a/distutils2/compiler/msvccompiler.py b/distutils2/compiler/msvccompiler.py index ee3e5cb..e24fb93 100644 --- a/distutils2/compiler/msvccompiler.py +++ b/distutils2/compiler/msvccompiler.py @@ -16,7 +16,7 @@ import string from distutils2.errors import (DistutilsExecError, DistutilsPlatformError, CompileError, LibError, LinkError) from distutils2.compiler.ccompiler import CCompiler, gen_lib_options -from distutils2 import log +from distutils2 import logger _can_read_reg = 0 try: @@ -43,7 +43,7 @@ except ImportError: RegError = win32api.error except ImportError: - log.info("Warning: Can't read registry to find the " + 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.") @@ -456,7 +456,7 @@ class MSVCCompiler (CCompiler) : raise LibError, msg else: - log.debug("skipping %s (up-to-date)", output_filename) + logger.debug("skipping %s (up-to-date)", output_filename) # create_static_lib () @@ -535,7 +535,7 @@ class MSVCCompiler (CCompiler) : raise LinkError, msg else: - log.debug("skipping %s (up-to-date)", output_filename) + logger.debug("skipping %s (up-to-date)", output_filename) # link () @@ -651,7 +651,7 @@ class MSVCCompiler (CCompiler) : if get_build_version() >= 8.0: - log.debug("Importing new compiler from distutils.msvc9compiler") + logger.debug("Importing new compiler from distutils.msvc9compiler") OldMSVCCompiler = MSVCCompiler from distutils2.compiler.msvc9compiler import MSVCCompiler # get_build_architecture not really relevant now we support cross-compile diff --git a/distutils2/compiler/unixccompiler.py b/distutils2/compiler/unixccompiler.py index 2152a71..55c98f1 100644 --- a/distutils2/compiler/unixccompiler.py +++ b/distutils2/compiler/unixccompiler.py @@ -22,7 +22,7 @@ from distutils2.compiler.ccompiler import (CCompiler, gen_preprocess_options, gen_lib_options) from distutils2.errors import (DistutilsExecError, CompileError, LibError, LinkError) -from distutils2 import log +from distutils2 import logger try: import sysconfig @@ -102,9 +102,9 @@ def _darwin_compiler_fixup(compiler_so, cc_args): sysroot = compiler_so[idx+1] if sysroot and not os.path.isdir(sysroot): - log.warn("Compiling with an SDK that doesn't seem to exist: %s", + logger.warning("Compiling with an SDK that doesn't seem to exist: %s", sysroot) - log.warn("Please check your Xcode installation") + logger.warning("Please check your Xcode installation") return compiler_so @@ -207,7 +207,7 @@ class UnixCCompiler(CCompiler): except DistutilsExecError, msg: raise LibError, msg else: - log.debug("skipping %s (up-to-date)", output_filename) + logger.debug("skipping %s (up-to-date)", output_filename) def link(self, target_desc, objects, output_filename, output_dir=None, libraries=None, @@ -261,7 +261,7 @@ class UnixCCompiler(CCompiler): except DistutilsExecError, msg: raise LinkError, msg else: - log.debug("skipping %s (up-to-date)", output_filename) + logger.debug("skipping %s (up-to-date)", output_filename) # -- Miscellaneous methods ----------------------------------------- # These are all used by the 'gen_lib_options() function, in |
