diff options
| author | Tarek Ziade <tarek@ziade.org> | 2010-11-13 12:40:33 +0100 |
|---|---|---|
| committer | Tarek Ziade <tarek@ziade.org> | 2010-11-13 12:40:33 +0100 |
| commit | 3ca8807f9de629210b35a39454db52a97ac86eb3 (patch) | |
| tree | 88e3dbd094e7ec839f46ff7a204c931415f47fad /distutils2/compiler | |
| parent | e09dd724df75ef090dda774c6dee2cd67c035e8d (diff) | |
| download | disutils2-3ca8807f9de629210b35a39454db52a97ac86eb3.tar.gz | |
compiler_type -> name
Diffstat (limited to 'distutils2/compiler')
| -rw-r--r-- | distutils2/compiler/__init__.py | 6 | ||||
| -rw-r--r-- | distutils2/compiler/bcppcompiler.py | 2 | ||||
| -rw-r--r-- | distutils2/compiler/ccompiler.py | 5 | ||||
| -rw-r--r-- | distutils2/compiler/cygwinccompiler.py | 7 | ||||
| -rw-r--r-- | distutils2/compiler/msvc9compiler.py | 2 | ||||
| -rw-r--r-- | distutils2/compiler/msvccompiler.py | 2 | ||||
| -rw-r--r-- | distutils2/compiler/unixccompiler.py | 2 |
7 files changed, 14 insertions, 12 deletions
diff --git a/distutils2/compiler/__init__.py b/distutils2/compiler/__init__.py index 9815ee9..9cda923 100644 --- a/distutils2/compiler/__init__.py +++ b/distutils2/compiler/__init__.py @@ -13,7 +13,7 @@ def customize_compiler(compiler): Mainly needed on Unix, so we can plug in the information that varies across Unices and is stored in Python's Makefile. """ - if compiler.compiler_type == "unix": + if compiler.name == "unix": (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ sysconfig.get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO', 'AR', @@ -116,8 +116,8 @@ _COMPILERS = { def set_compiler(location): """Add or change a compiler""" klass = resolve_name(location) - # XXX we want to check teh class here - _COMPILERS[klass.compiler_type] = klass + # XXX we want to check the class here + _COMPILERS[klass.name] = klass def show_compilers(): diff --git a/distutils2/compiler/bcppcompiler.py b/distutils2/compiler/bcppcompiler.py index eaa3a54..dbf287e 100644 --- a/distutils2/compiler/bcppcompiler.py +++ b/distutils2/compiler/bcppcompiler.py @@ -26,7 +26,7 @@ class BCPPCompiler(CCompiler) : compiler, as defined by the CCompiler abstract class. """ - compiler_type = 'bcpp' + name = 'bcpp' description = 'Borland C++ Compiler' # Just set this so CCompiler's constructor doesn't barf. We currently diff --git a/distutils2/compiler/ccompiler.py b/distutils2/compiler/ccompiler.py index e38ce95..d06b1ff 100644 --- a/distutils2/compiler/ccompiler.py +++ b/distutils2/compiler/ccompiler.py @@ -15,6 +15,7 @@ from distutils2.util import split_quoted, execute, newer_group, spawn from distutils2 import logger from distutils2.compiler import gen_preprocess_options + class CCompiler(object): """Abstract base class to define the interface that must be implemented by real compiler classes. Also has some utility methods used by @@ -29,11 +30,11 @@ class CCompiler(object): attributes may be varied on a per-compilation or per-link basis. """ - # 'compiler_type' is a class attribute that identifies this class. It + # 'name' is a class attribute that identifies this class. It # keeps code that wants to know what kind of compiler it's dealing with # from having to import all possible compiler classes just to do an # 'isinstance'. - compiler_type = None + name = None description = None # XXX things not handled by this compiler abstraction model: diff --git a/distutils2/compiler/cygwinccompiler.py b/distutils2/compiler/cygwinccompiler.py index c094fad..2414649 100644 --- a/distutils2/compiler/cygwinccompiler.py +++ b/distutils2/compiler/cygwinccompiler.py @@ -85,7 +85,7 @@ def get_msvcr(): class CygwinCCompiler(UnixCCompiler): """ Handles the Cygwin port of the GNU C compiler to Windows. """ - compiler_type = 'cygwin' + name = 'cygwin' description = 'Cygwin port of GNU C Compiler for Win32' obj_extension = ".o" static_lib_extension = ".a" @@ -110,7 +110,7 @@ class CygwinCCompiler(UnixCCompiler): self.gcc_version, self.ld_version, self.dllwrap_version = \ get_compiler_versions() - self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" % + self.debug_print(self.name + ": gcc %s, ld %s, dllwrap %s\n" % (self.gcc_version, self.ld_version, self.dllwrap_version) ) @@ -272,7 +272,8 @@ class CygwinCCompiler(UnixCCompiler): class Mingw32CCompiler(CygwinCCompiler): """ Handles the Mingw32 port of the GNU C compiler to Windows. """ - compiler_type = 'mingw32' + name = 'mingw32' + description = 'MinGW32 compiler' def __init__(self, verbose=0, dry_run=0, force=0): diff --git a/distutils2/compiler/msvc9compiler.py b/distutils2/compiler/msvc9compiler.py index 1e444de..9f9e50d 100644 --- a/distutils2/compiler/msvc9compiler.py +++ b/distutils2/compiler/msvc9compiler.py @@ -285,7 +285,7 @@ class MSVCCompiler(CCompiler) : """Concrete class that implements an interface to Microsoft Visual C++, as defined by the CCompiler abstract class.""" - compiler_type = 'msvc' + name = 'msvc' description = 'Microsoft Visual C++' # Just set this so CCompiler's constructor doesn't barf. We currently diff --git a/distutils2/compiler/msvccompiler.py b/distutils2/compiler/msvccompiler.py index d9279f4..a921ab7 100644 --- a/distutils2/compiler/msvccompiler.py +++ b/distutils2/compiler/msvccompiler.py @@ -205,7 +205,7 @@ class MSVCCompiler (CCompiler) : """Concrete class that implements an interface to Microsoft Visual C++, as defined by the CCompiler abstract class.""" - compiler_type = 'msvc' + name = 'msvc' description = "Microsoft Visual C++" # Just set this so CCompiler's constructor doesn't barf. We currently diff --git a/distutils2/compiler/unixccompiler.py b/distutils2/compiler/unixccompiler.py index c2c390a..555b77b 100644 --- a/distutils2/compiler/unixccompiler.py +++ b/distutils2/compiler/unixccompiler.py @@ -106,7 +106,7 @@ def _darwin_compiler_fixup(compiler_so, cc_args): class UnixCCompiler(CCompiler): - compiler_type = 'unix' + name = 'unix' description = 'Standard UNIX-style compiler' # These are used by CCompiler in two places: the constructor sets |
