summaryrefslogtreecommitdiff
path: root/distutils2/compiler
diff options
context:
space:
mode:
author?ric Araujo <merwok@netwok.org>2010-11-16 06:27:08 +0100
committer?ric Araujo <merwok@netwok.org>2010-11-16 06:27:08 +0100
commitc3f280671467645ef5ac6706abcbf682b6a4e830 (patch)
tree9b71c3aab3b1430aecb7f3bb8f98ccc65c68baf7 /distutils2/compiler
parent109db89889bea60702be66815806efcc03c5c1b6 (diff)
downloaddisutils2-c3f280671467645ef5ac6706abcbf682b6a4e830.tar.gz
A touch of PEP 8 and pyflaking
Diffstat (limited to 'distutils2/compiler')
-rw-r--r--distutils2/compiler/__init__.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/distutils2/compiler/__init__.py b/distutils2/compiler/__init__.py
index 9cda923..6b24ae1 100644
--- a/distutils2/compiler/__init__.py
+++ b/distutils2/compiler/__init__.py
@@ -4,7 +4,7 @@ import re
from distutils2._backport import sysconfig
from distutils2.util import resolve_name
-from distutils2.errors import DistutilsModuleError, DistutilsPlatformError
+from distutils2.errors import DistutilsPlatformError
def customize_compiler(compiler):
@@ -115,9 +115,9 @@ _COMPILERS = {
def set_compiler(location):
"""Add or change a compiler"""
- klass = resolve_name(location)
+ cls = resolve_name(location)
# XXX we want to check the class here
- _COMPILERS[klass.name] = klass
+ _COMPILERS[cls.name] = cls
def show_compilers():
@@ -127,12 +127,12 @@ def show_compilers():
from distutils2.fancy_getopt import FancyGetopt
compilers = []
- for name, klass in _COMPILERS.items():
- if isinstance(klass, str):
- klass = resolve_name(klass)
- _COMPILERS[name] = klass
+ for name, cls in _COMPILERS.items():
+ if isinstance(cls, str):
+ cls = resolve_name(cls)
+ _COMPILERS[name] = cls
- compilers.append(("compiler=" + compiler, None, klass.description))
+ compilers.append(("compiler=" + name, None, cls.description))
compilers.sort()
pretty_printer = FancyGetopt(compilers)
@@ -157,22 +157,22 @@ def new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0):
if compiler is None:
compiler = get_default_compiler(plat)
- klass = _COMPILERS[compiler]
+ cls = _COMPILERS[compiler]
except KeyError:
msg = "don't know how to compile C/C++ code on platform '%s'" % plat
if compiler is not None:
msg = msg + " with '%s' compiler" % compiler
raise DistutilsPlatformError(msg)
- if isinstance(klass, str):
- klass = resolve_name(klass)
- _COMPILERS[compiler] = klass
+ if isinstance(cls, str):
+ cls = resolve_name(cls)
+ _COMPILERS[compiler] = cls
# XXX The None is necessary to preserve backwards compatibility
# with classes that expect verbose to be the first positional
# argument.
- return klass(None, dry_run, force)
+ return cls(None, dry_run, force)
def gen_preprocess_options(macros, include_dirs):