Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
distutils.ccompiler.CCompiler Class Reference
Inheritance diagram for distutils.ccompiler.CCompiler:
Inheritance graph
[legend]
Collaboration diagram for distutils.ccompiler.CCompiler:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def set_executables
def set_executable
def define_macro
def undefine_macro
def add_include_dir
def set_include_dirs
def add_library
def set_libraries
def add_library_dir
def set_library_dirs
def add_runtime_library_dir
def set_runtime_library_dirs
def add_link_object
def set_link_objects
def detect_language
def preprocess
def compile
def create_static_lib
def link
def link_shared_lib
def link_shared_object
def link_executable
def library_dir_option
def runtime_library_dir_option
def library_option
def has_function
def find_library_file
def object_filenames
def shared_object_filename
def executable_filename
def library_filename
def announce
def debug_print
def warn
def execute
def spawn
def move_file
def mkpath

Public Attributes

 dry_run
 force
 verbose
 output_dir
 macros
 include_dirs
 libraries
 library_dirs
 runtime_library_dirs
 objects

Static Public Attributes

 compiler_type = None
 src_extensions = None
 obj_extension = None
 static_lib_extension = None
 shared_lib_extension = None
 static_lib_format = None
 shared_lib_format = None
 exe_extension = None
dictionary language_map
list language_order = ["c++", "objc", "c"]
string SHARED_OBJECT = "shared_object"
string SHARED_LIBRARY = "shared_library"
string EXECUTABLE = "executable"

Private Member Functions

def _find_macro
def _check_macro_definitions
def _setup_compile
def _get_cc_args
def _fix_compile_args
def _prep_compile
def _fix_object_args
def _fix_lib_args
def _need_link
def _compile

Detailed Description

Abstract base class to define the interface that must be implemented
by real compiler classes.  Also has some utility methods used by
several compiler classes.

The basic idea behind a compiler abstraction class is that each
instance can be used for all the compile/link steps in building a
single project.  Thus, attributes common to all of those compile and
link steps -- include directories, macros to define, libraries to link
against, etc. -- are attributes of the compiler instance.  To allow for
variability in how individual files are treated, most of those
attributes may be varied on a per-compilation or per-link basis.

Definition at line 15 of file ccompiler.py.


Constructor & Destructor Documentation

def distutils.ccompiler.CCompiler.__init__ (   self,
  verbose = 0,
  dry_run = 0,
  force = 0 
)

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 85 of file ccompiler.py.

00085 
00086     def __init__(self, verbose=0, dry_run=0, force=0):
00087         self.dry_run = dry_run
00088         self.force = force
00089         self.verbose = verbose
00090 
00091         # 'output_dir': a common output directory for object, library,
00092         # shared object, and shared library files
00093         self.output_dir = None
00094 
00095         # 'macros': a list of macro definitions (or undefinitions).  A
00096         # macro definition is a 2-tuple (name, value), where the value is
00097         # either a string or None (no explicit value).  A macro
00098         # undefinition is a 1-tuple (name,).
00099         self.macros = []
00100 
00101         # 'include_dirs': a list of directories to search for include files
00102         self.include_dirs = []
00103 
00104         # 'libraries': a list of libraries to include in any link
00105         # (library names, not filenames: eg. "foo" not "libfoo.a")
00106         self.libraries = []
00107 
00108         # 'library_dirs': a list of directories to search for libraries
00109         self.library_dirs = []
00110 
00111         # 'runtime_library_dirs': a list of directories to search for
00112         # shared libraries/objects at runtime
00113         self.runtime_library_dirs = []
00114 
00115         # 'objects': a list of object files (or similar, such as explicitly
00116         # named library files) to include on any link
00117         self.objects = []
00118 
00119         for key in self.executables.keys():
00120             self.set_executable(key, self.executables[key])

Here is the caller graph for this function:


Member Function Documentation

def distutils.ccompiler.CCompiler._check_macro_definitions (   self,
  definitions 
) [private]
Ensures that every element of 'definitions' is a valid macro
definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
nothing if all definitions are OK, raise TypeError otherwise.

Definition at line 167 of file ccompiler.py.

00167 
00168     def _check_macro_definitions(self, definitions):
00169         """Ensures that every element of 'definitions' is a valid macro
00170         definition, ie. either (name,value) 2-tuple or a (name,) tuple.  Do
00171         nothing if all definitions are OK, raise TypeError otherwise.
00172         """
00173         for defn in definitions:
00174             if not (isinstance(defn, tuple) and
00175                     (len(defn) in (1, 2) and
00176                       (isinstance (defn[1], str) or defn[1] is None)) and
00177                     isinstance (defn[0], str)):
00178                 raise TypeError(("invalid macro definition '%s': " % defn) + \
00179                       "must be tuple (string,), (string, string), or " + \
00180                       "(string, None)")
00181 

def distutils.ccompiler.CCompiler._compile (   self,
  obj,
  src,
  ext,
  cc_args,
  extra_postargs,
  pp_opts 
) [private]
Compile 'src' to product 'obj'.

Definition at line 579 of file ccompiler.py.

00579 
00580     def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
00581         """Compile 'src' to product 'obj'."""
00582         # A concrete compiler class that does not override compile()
00583         # should implement _compile().
00584         pass

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler._find_macro (   self,
  name 
) [private]

Definition at line 159 of file ccompiler.py.

00159 
00160     def _find_macro(self, name):
00161         i = 0
00162         for defn in self.macros:
00163             if defn[0] == name:
00164                 return i
00165             i += 1
00166         return None

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler._fix_compile_args (   self,
  output_dir,
  macros,
  include_dirs 
) [private]
Typecheck and fix-up some of the arguments to the 'compile()'
method, and return fixed-up values.  Specifically: if 'output_dir'
is None, replaces it with 'self.output_dir'; ensures that 'macros'
is a list, and augments it with 'self.macros'; ensures that
'include_dirs' is a list, and augments it with 'self.include_dirs'.
Guarantees that the returned values are of the correct type,
i.e. for 'output_dir' either string or None, and for 'macros' and
'include_dirs' either list or None.

Definition at line 362 of file ccompiler.py.

00362 
00363     def _fix_compile_args(self, output_dir, macros, include_dirs):
00364         """Typecheck and fix-up some of the arguments to the 'compile()'
00365         method, and return fixed-up values.  Specifically: if 'output_dir'
00366         is None, replaces it with 'self.output_dir'; ensures that 'macros'
00367         is a list, and augments it with 'self.macros'; ensures that
00368         'include_dirs' is a list, and augments it with 'self.include_dirs'.
00369         Guarantees that the returned values are of the correct type,
00370         i.e. for 'output_dir' either string or None, and for 'macros' and
00371         'include_dirs' either list or None.
00372         """
00373         if output_dir is None:
00374             output_dir = self.output_dir
00375         elif not isinstance(output_dir, str):
00376             raise TypeError("'output_dir' must be a string or None")
00377 
00378         if macros is None:
00379             macros = self.macros
00380         elif isinstance(macros, list):
00381             macros = macros + (self.macros or [])
00382         else:
00383             raise TypeError("'macros' (if supplied) must be a list of tuples")
00384 
00385         if include_dirs is None:
00386             include_dirs = self.include_dirs
00387         elif isinstance(include_dirs, (list, tuple)):
00388             include_dirs = list(include_dirs) + (self.include_dirs or [])
00389         else:
00390             raise TypeError(
00391                   "'include_dirs' (if supplied) must be a list of strings")
00392 
00393         return output_dir, macros, include_dirs

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler._fix_lib_args (   self,
  libraries,
  library_dirs,
  runtime_library_dirs 
) [private]
Typecheck and fix up some of the arguments supplied to the
'link_*' methods.  Specifically: ensure that all arguments are
lists, and augment them with their permanent versions
(eg. 'self.libraries' augments 'libraries').  Return a tuple with
fixed versions of all arguments.

Definition at line 427 of file ccompiler.py.

00427 
00428     def _fix_lib_args(self, libraries, library_dirs, runtime_library_dirs):
00429         """Typecheck and fix up some of the arguments supplied to the
00430         'link_*' methods.  Specifically: ensure that all arguments are
00431         lists, and augment them with their permanent versions
00432         (eg. 'self.libraries' augments 'libraries').  Return a tuple with
00433         fixed versions of all arguments.
00434         """
00435         if libraries is None:
00436             libraries = self.libraries
00437         elif isinstance(libraries, (list, tuple)):
00438             libraries = list (libraries) + (self.libraries or [])
00439         else:
00440             raise TypeError(
00441                   "'libraries' (if supplied) must be a list of strings")
00442 
00443         if library_dirs is None:
00444             library_dirs = self.library_dirs
00445         elif isinstance(library_dirs, (list, tuple)):
00446             library_dirs = list (library_dirs) + (self.library_dirs or [])
00447         else:
00448             raise TypeError(
00449                   "'library_dirs' (if supplied) must be a list of strings")
00450 
00451         if runtime_library_dirs is None:
00452             runtime_library_dirs = self.runtime_library_dirs
00453         elif isinstance(runtime_library_dirs, (list, tuple)):
00454             runtime_library_dirs = (list(runtime_library_dirs) +
00455                                     (self.runtime_library_dirs or []))
00456         else:
00457             raise TypeError("'runtime_library_dirs' (if supplied) "
00458                             "must be a list of strings")
00459 
00460         return (libraries, library_dirs, runtime_library_dirs)

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler._fix_object_args (   self,
  objects,
  output_dir 
) [private]
Typecheck and fix up some arguments supplied to various methods.
Specifically: ensure that 'objects' is a list; if output_dir is
None, replace with self.output_dir.  Return fixed versions of
'objects' and 'output_dir'.

Definition at line 410 of file ccompiler.py.

00410 
00411     def _fix_object_args(self, objects, output_dir):
00412         """Typecheck and fix up some arguments supplied to various methods.
00413         Specifically: ensure that 'objects' is a list; if output_dir is
00414         None, replace with self.output_dir.  Return fixed versions of
00415         'objects' and 'output_dir'.
00416         """
00417         if not isinstance(objects, (list, tuple)):
00418             raise TypeError("'objects' must be a list or tuple of strings")
00419         objects = list(objects)
00420 
00421         if output_dir is None:
00422             output_dir = self.output_dir
00423         elif not isinstance(output_dir, str):
00424             raise TypeError("'output_dir' must be a string or None")
00425 
00426         return (objects, output_dir)

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler._get_cc_args (   self,
  pp_opts,
  debug,
  before 
) [private]

Definition at line 353 of file ccompiler.py.

00353 
00354     def _get_cc_args(self, pp_opts, debug, before):
00355         # works for unixccompiler, emxccompiler, cygwinccompiler
00356         cc_args = pp_opts + ['-c']
00357         if debug:
00358             cc_args[:0] = ['-g']
00359         if before:
00360             cc_args[:0] = before
00361         return cc_args

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler._need_link (   self,
  objects,
  output_file 
) [private]
Return true if we need to relink the files listed in 'objects'
to recreate 'output_file'.

Definition at line 461 of file ccompiler.py.

00461 
00462     def _need_link(self, objects, output_file):
00463         """Return true if we need to relink the files listed in 'objects'
00464         to recreate 'output_file'.
00465         """
00466         if self.force:
00467             return True
00468         else:
00469             if self.dry_run:
00470                 newer = newer_group (objects, output_file, missing='newer')
00471             else:
00472                 newer = newer_group (objects, output_file)
00473             return newer

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler._prep_compile (   self,
  sources,
  output_dir,
  depends = None 
) [private]
Decide which souce files must be recompiled.

Determine the list of object files corresponding to 'sources',
and figure out which ones really need to be recompiled.
Return a list of all object files and a dictionary telling
which source files can be skipped.

Definition at line 394 of file ccompiler.py.

00394 
00395     def _prep_compile(self, sources, output_dir, depends=None):
00396         """Decide which souce files must be recompiled.
00397 
00398         Determine the list of object files corresponding to 'sources',
00399         and figure out which ones really need to be recompiled.
00400         Return a list of all object files and a dictionary telling
00401         which source files can be skipped.
00402         """
00403         # Get the list of expected output (object) files
00404         objects = self.object_filenames(sources, output_dir=output_dir)
00405         assert len(objects) == len(sources)
00406 
00407         # Return an empty dict for the "which source files can be skipped"
00408         # return value to preserve API compatibility.
00409         return objects, {}

Here is the call graph for this function:

def distutils.ccompiler.CCompiler._setup_compile (   self,
  outdir,
  macros,
  incdirs,
  sources,
  depends,
  extra 
) [private]
Process arguments and decide which source files to compile.

Definition at line 311 of file ccompiler.py.

00311 
00312                        extra):
00313         """Process arguments and decide which source files to compile."""
00314         if outdir is None:
00315             outdir = self.output_dir
00316         elif not isinstance(outdir, str):
00317             raise TypeError("'output_dir' must be a string or None")
00318 
00319         if macros is None:
00320             macros = self.macros
00321         elif isinstance(macros, list):
00322             macros = macros + (self.macros or [])
00323         else:
00324             raise TypeError("'macros' (if supplied) must be a list of tuples")
00325 
00326         if incdirs is None:
00327             incdirs = self.include_dirs
00328         elif isinstance(incdirs, (list, tuple)):
00329             incdirs = list(incdirs) + (self.include_dirs or [])
00330         else:
00331             raise TypeError(
00332                   "'include_dirs' (if supplied) must be a list of strings")
00333 
00334         if extra is None:
00335             extra = []
00336 
00337         # Get the list of expected output (object) files
00338         objects = self.object_filenames(sources, strip_dir=0,
00339                                         output_dir=outdir)
00340         assert len(objects) == len(sources)
00341 
00342         pp_opts = gen_preprocess_options(macros, incdirs)
00343 
00344         build = {}
00345         for i in range(len(sources)):
00346             src = sources[i]
00347             obj = objects[i]
00348             ext = os.path.splitext(src)[1]
00349             self.mkpath(os.path.dirname(obj))
00350             build[obj] = (src, ext)
00351 
00352         return macros, objects, extra, pp_opts, build

Here is the call graph for this function:

Here is the caller graph for this function:

Add 'dir' to the list of directories that will be searched for
header files.  The compiler is instructed to search directories in
the order in which they are supplied by successive calls to
'add_include_dir()'.

Definition at line 217 of file ccompiler.py.

00217 
00218     def add_include_dir(self, dir):
00219         """Add 'dir' to the list of directories that will be searched for
00220         header files.  The compiler is instructed to search directories in
00221         the order in which they are supplied by successive calls to
00222         'add_include_dir()'.
00223         """
00224         self.include_dirs.append(dir)

def distutils.ccompiler.CCompiler.add_library (   self,
  libname 
)
Add 'libname' to the list of libraries that will be included in
all links driven by this compiler object.  Note that 'libname'
should *not* be the name of a file containing a library, but the
name of the library itself: the actual filename will be inferred by
the linker, the compiler, or the compiler class (depending on the
platform).

The linker will be instructed to link against libraries in the
order they were supplied to 'add_library()' and/or
'set_libraries()'.  It is perfectly valid to duplicate library
names; the linker will be instructed to link against libraries as
many times as they are mentioned.

Definition at line 235 of file ccompiler.py.

00235 
00236     def add_library(self, libname):
00237         """Add 'libname' to the list of libraries that will be included in
00238         all links driven by this compiler object.  Note that 'libname'
00239         should *not* be the name of a file containing a library, but the
00240         name of the library itself: the actual filename will be inferred by
00241         the linker, the compiler, or the compiler class (depending on the
00242         platform).
00243 
00244         The linker will be instructed to link against libraries in the
00245         order they were supplied to 'add_library()' and/or
00246         'set_libraries()'.  It is perfectly valid to duplicate library
00247         names; the linker will be instructed to link against libraries as
00248         many times as they are mentioned.
00249         """
00250         self.libraries.append(libname)

Add 'dir' to the list of directories that will be searched for
libraries specified to 'add_library()' and 'set_libraries()'.  The
linker will be instructed to search for libraries in the order they
are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.

Definition at line 259 of file ccompiler.py.

00259 
00260     def add_library_dir(self, dir):
00261         """Add 'dir' to the list of directories that will be searched for
00262         libraries specified to 'add_library()' and 'set_libraries()'.  The
00263         linker will be instructed to search for libraries in the order they
00264         are supplied to 'add_library_dir()' and/or 'set_library_dirs()'.
00265         """
00266         self.library_dirs.append(dir)

def distutils.ccompiler.CCompiler.add_link_object (   self,
  object 
)
Add 'object' to the list of object files (or analogues, such as
explicitly named library files or the output of "resource
compilers") to be included in every link driven by this compiler
object.

Definition at line 288 of file ccompiler.py.

00288 
00289     def add_link_object(self, object):
00290         """Add 'object' to the list of object files (or analogues, such as
00291         explicitly named library files or the output of "resource
00292         compilers") to be included in every link driven by this compiler
00293         object.
00294         """
00295         self.objects.append(object)

Add 'dir' to the list of directories that will be searched for
shared libraries at runtime.

Definition at line 274 of file ccompiler.py.

00274 
00275     def add_runtime_library_dir(self, dir):
00276         """Add 'dir' to the list of directories that will be searched for
00277         shared libraries at runtime.
00278         """
00279         self.runtime_library_dirs.append(dir)

def distutils.ccompiler.CCompiler.announce (   self,
  msg,
  level = 1 
)

Definition at line 894 of file ccompiler.py.

00894 
00895     def announce(self, msg, level=1):
00896         log.debug(msg)

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler.compile (   self,
  sources,
  output_dir = None,
  macros = None,
  include_dirs = None,
  debug = 0,
  extra_preargs = None,
  extra_postargs = None,
  depends = None 
)
Compile one or more source files.

'sources' must be a list of filenames, most likely C/C++
files, but in reality anything that can be handled by a
particular compiler and compiler class (eg. MSVCCompiler can
handle resource files in 'sources').  Return a list of object
filenames, one per source filename in 'sources'.  Depending on
the implementation, not all source files will necessarily be
compiled, but all corresponding object filenames will be
returned.

If 'output_dir' is given, object files will be put under it, while
retaining their original path component.  That is, "foo/bar.c"
normally compiles to "foo/bar.o" (for a Unix implementation); if
'output_dir' is "build", then it would compile to
"build/foo/bar.o".

'macros', if given, must be a list of macro definitions.  A macro
definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
The former defines a macro; if the value is None, the macro is
defined without an explicit value.  The 1-tuple case undefines a
macro.  Later definitions/redefinitions/ undefinitions take
precedence.

'include_dirs', if given, must be a list of strings, the
directories to add to the default include file search path for this
compilation only.

'debug' is a boolean; if true, the compiler will be instructed to
output debug symbols in (or alongside) the object file(s).

'extra_preargs' and 'extra_postargs' are implementation- dependent.
On platforms that have the notion of a command-line (e.g. Unix,
DOS/Windows), they are most likely lists of strings: extra
command-line arguments to prepand/append to the compiler command
line.  On other platforms, consult the implementation class
documentation.  In any event, they are intended as an escape hatch
for those occasions when the abstract compiler framework doesn't
cut the mustard.

'depends', if given, is a list of filenames that all targets
depend on.  If a source file is older than any file in
depends, then the source file will be recompiled.  This
supports dependency tracking, but only at a coarse
granularity.

Raises CompileError on failure.

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 513 of file ccompiler.py.

00513 
00514                 extra_postargs=None, depends=None):
00515         """Compile one or more source files.
00516 
00517         'sources' must be a list of filenames, most likely C/C++
00518         files, but in reality anything that can be handled by a
00519         particular compiler and compiler class (eg. MSVCCompiler can
00520         handle resource files in 'sources').  Return a list of object
00521         filenames, one per source filename in 'sources'.  Depending on
00522         the implementation, not all source files will necessarily be
00523         compiled, but all corresponding object filenames will be
00524         returned.
00525 
00526         If 'output_dir' is given, object files will be put under it, while
00527         retaining their original path component.  That is, "foo/bar.c"
00528         normally compiles to "foo/bar.o" (for a Unix implementation); if
00529         'output_dir' is "build", then it would compile to
00530         "build/foo/bar.o".
00531 
00532         'macros', if given, must be a list of macro definitions.  A macro
00533         definition is either a (name, value) 2-tuple or a (name,) 1-tuple.
00534         The former defines a macro; if the value is None, the macro is
00535         defined without an explicit value.  The 1-tuple case undefines a
00536         macro.  Later definitions/redefinitions/ undefinitions take
00537         precedence.
00538 
00539         'include_dirs', if given, must be a list of strings, the
00540         directories to add to the default include file search path for this
00541         compilation only.
00542 
00543         'debug' is a boolean; if true, the compiler will be instructed to
00544         output debug symbols in (or alongside) the object file(s).
00545 
00546         'extra_preargs' and 'extra_postargs' are implementation- dependent.
00547         On platforms that have the notion of a command-line (e.g. Unix,
00548         DOS/Windows), they are most likely lists of strings: extra
00549         command-line arguments to prepand/append to the compiler command
00550         line.  On other platforms, consult the implementation class
00551         documentation.  In any event, they are intended as an escape hatch
00552         for those occasions when the abstract compiler framework doesn't
00553         cut the mustard.
00554 
00555         'depends', if given, is a list of filenames that all targets
00556         depend on.  If a source file is older than any file in
00557         depends, then the source file will be recompiled.  This
00558         supports dependency tracking, but only at a coarse
00559         granularity.
00560 
00561         Raises CompileError on failure.
00562         """
00563         # A concrete compiler class can either override this method
00564         # entirely or implement _compile().
00565         macros, objects, extra_postargs, pp_opts, build = \
00566                 self._setup_compile(output_dir, macros, include_dirs, sources,
00567                                     depends, extra_postargs)
00568         cc_args = self._get_cc_args(pp_opts, debug, extra_preargs)
00569 
00570         for obj in objects:
00571             try:
00572                 src, ext = build[obj]
00573             except KeyError:
00574                 continue
00575             self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
00576 
00577         # Return *all* object filenames, not just the ones we just built.
00578         return objects

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler.create_static_lib (   self,
  objects,
  output_libname,
  output_dir = None,
  debug = 0,
  target_lang = None 
)
Link a bunch of stuff together to create a static library file.
The "bunch of stuff" consists of the list of object files supplied
as 'objects', the extra object files supplied to
'add_link_object()' and/or 'set_link_objects()', the libraries
supplied to 'add_library()' and/or 'set_libraries()', and the
libraries supplied as 'libraries' (if any).

'output_libname' should be a library name, not a filename; the
filename will be inferred from the library name.  'output_dir' is
the directory where the library file will be put.

'debug' is a boolean; if true, debugging information will be
included in the library (note that on most platforms, it is the
compile step where this matters: the 'debug' flag is included here
just for consistency).

'target_lang' is the target language for which the given objects
are being compiled. This allows specific linkage time treatment of
certain languages.

Raises LibError on failure.

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 586 of file ccompiler.py.

00586 
00587                           debug=0, target_lang=None):
00588         """Link a bunch of stuff together to create a static library file.
00589         The "bunch of stuff" consists of the list of object files supplied
00590         as 'objects', the extra object files supplied to
00591         'add_link_object()' and/or 'set_link_objects()', the libraries
00592         supplied to 'add_library()' and/or 'set_libraries()', and the
00593         libraries supplied as 'libraries' (if any).
00594 
00595         'output_libname' should be a library name, not a filename; the
00596         filename will be inferred from the library name.  'output_dir' is
00597         the directory where the library file will be put.
00598 
00599         'debug' is a boolean; if true, debugging information will be
00600         included in the library (note that on most platforms, it is the
00601         compile step where this matters: the 'debug' flag is included here
00602         just for consistency).
00603 
00604         'target_lang' is the target language for which the given objects
00605         are being compiled. This allows specific linkage time treatment of
00606         certain languages.
00607 
00608         Raises LibError on failure.
00609         """
00610         pass
00611 

def distutils.ccompiler.CCompiler.debug_print (   self,
  msg 
)

Definition at line 897 of file ccompiler.py.

00897 
00898     def debug_print(self, msg):
00899         from distutils.debug import DEBUG
00900         if DEBUG:
00901             print(msg)

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler.define_macro (   self,
  name,
  value = None 
)
Define a preprocessor macro for all compilations driven by this
compiler object.  The optional parameter 'value' should be a
string; if it is not supplied, then the macro will be defined
without an explicit value and the exact outcome depends on the
compiler used (XXX true? does ANSI say anything about this?)

Definition at line 184 of file ccompiler.py.

00184 
00185     def define_macro(self, name, value=None):
00186         """Define a preprocessor macro for all compilations driven by this
00187         compiler object.  The optional parameter 'value' should be a
00188         string; if it is not supplied, then the macro will be defined
00189         without an explicit value and the exact outcome depends on the
00190         compiler used (XXX true? does ANSI say anything about this?)
00191         """
00192         # Delete from the list of macro definitions/undefinitions if
00193         # already there (so that this one will take precedence).
00194         i = self._find_macro (name)
00195         if i is not None:
00196             del self.macros[i]
00197 
00198         self.macros.append((name, value))

Here is the call graph for this function:

def distutils.ccompiler.CCompiler.detect_language (   self,
  sources 
)
Detect the language of a given file, or list of files. Uses
language_map, and language_order to do the job.

Definition at line 474 of file ccompiler.py.

00474 
00475     def detect_language(self, sources):
00476         """Detect the language of a given file, or list of files. Uses
00477         language_map, and language_order to do the job.
00478         """
00479         if not isinstance(sources, list):
00480             sources = [sources]
00481         lang = None
00482         index = len(self.language_order)
00483         for source in sources:
00484             base, ext = os.path.splitext(source)
00485             extlang = self.language_map.get(ext)
00486             try:
00487                 extindex = self.language_order.index(extlang)
00488                 if extindex < index:
00489                     lang = extlang
00490                     index = extindex
00491             except ValueError:
00492                 pass
00493         return lang
00494 

Here is the call graph for this function:

def distutils.ccompiler.CCompiler.executable_filename (   self,
  basename,
  strip_dir = 0,
  output_dir = '' 
)

Definition at line 869 of file ccompiler.py.

00869 
00870     def executable_filename(self, basename, strip_dir=0, output_dir=''):
00871         assert output_dir is not None
00872         if strip_dir:
00873             basename = os.path.basename(basename)
00874         return os.path.join(output_dir, basename + (self.exe_extension or ''))

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler.execute (   self,
  func,
  args,
  msg = None,
  level = 1 
)

Definition at line 905 of file ccompiler.py.

00905 
00906     def execute(self, func, args, msg=None, level=1):
00907         execute(func, args, msg, self.dry_run)

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler.find_library_file (   self,
  dirs,
  lib,
  debug = 0 
)
Search the specified list of directories for a static or shared
library file 'lib' and return the full path to that file.  If
'debug' true, look for a debugging version (if that makes sense on
the current platform).  Return None if 'lib' wasn't found in any of
the specified directories.

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 803 of file ccompiler.py.

00803 
00804     def find_library_file (self, dirs, lib, debug=0):
00805         """Search the specified list of directories for a static or shared
00806         library file 'lib' and return the full path to that file.  If
00807         'debug' true, look for a debugging version (if that makes sense on
00808         the current platform).  Return None if 'lib' wasn't found in any of
00809         the specified directories.
00810         """
00811         raise NotImplementedError

def distutils.ccompiler.CCompiler.has_function (   self,
  funcname,
  includes = None,
  include_dirs = None,
  libraries = None,
  library_dirs = None 
)
Return a boolean indicating whether funcname is supported on
the current platform.  The optional arguments can be used to
augment the compilation environment.

Definition at line 761 of file ccompiler.py.

00761 
00762                      libraries=None, library_dirs=None):
00763         """Return a boolean indicating whether funcname is supported on
00764         the current platform.  The optional arguments can be used to
00765         augment the compilation environment.
00766         """
00767         # this can't be included at module scope because it tries to
00768         # import math which might not be available at that point - maybe
00769         # the necessary logic should just be inlined?
00770         import tempfile
00771         if includes is None:
00772             includes = []
00773         if include_dirs is None:
00774             include_dirs = []
00775         if libraries is None:
00776             libraries = []
00777         if library_dirs is None:
00778             library_dirs = []
00779         fd, fname = tempfile.mkstemp(".c", funcname, text=True)
00780         f = os.fdopen(fd, "w")
00781         try:
00782             for incl in includes:
00783                 f.write("""#include "%s"\n""" % incl)
00784             f.write("""\
00785 main (int argc, char **argv) {
00786     %s();
00787 }
00788 """ % funcname)
00789         finally:
00790             f.close()
00791         try:
00792             objects = self.compile([fname], include_dirs=include_dirs)
00793         except CompileError:
00794             return False
00795 
00796         try:
00797             self.link_executable(objects, "a.out",
00798                                  libraries=libraries,
00799                                  library_dirs=library_dirs)
00800         except (LinkError, TypeError):
00801             return False
00802         return True

Here is the call graph for this function:

Here is the caller graph for this function:

Return the compiler option to add 'dir' to the list of
directories searched for libraries.

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 742 of file ccompiler.py.

00742 
00743     def library_dir_option(self, dir):
00744         """Return the compiler option to add 'dir' to the list of
00745         directories searched for libraries.
00746         """
00747         raise NotImplementedError

def distutils.ccompiler.CCompiler.library_filename (   self,
  libname,
  lib_type = 'static',
  strip_dir = 0,
  output_dir = '' 
)

Definition at line 876 of file ccompiler.py.

00876 
00877                          strip_dir=0, output_dir=''):
00878         assert output_dir is not None
00879         if lib_type not in ("static", "shared", "dylib"):
00880             raise ValueError(
00881                   "'lib_type' must be \"static\", \"shared\" or \"dylib\"")
00882         fmt = getattr(self, lib_type + "_lib_format")
00883         ext = getattr(self, lib_type + "_lib_extension")
00884 
00885         dir, base = os.path.split(libname)
00886         filename = fmt % (base, ext)
00887         if strip_dir:
00888             dir = ''
00889 
00890         return os.path.join(output_dir, dir, filename)
00891 

Here is the call graph for this function:

Here is the caller graph for this function:

Return the compiler option to add 'dir' to the list of libraries
linked into the shared library or executable.

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 754 of file ccompiler.py.

00754 
00755     def library_option(self, lib):
00756         """Return the compiler option to add 'dir' to the list of libraries
00757         linked into the shared library or executable.
00758         """
00759         raise NotImplementedError

Here is the call graph for this function:

def distutils.ccompiler.CCompiler.link (   self,
  target_desc,
  objects,
  output_filename,
  output_dir = None,
  libraries = None,
  library_dirs = None,
  runtime_library_dirs = None,
  export_symbols = None,
  debug = 0,
  extra_preargs = None,
  extra_postargs = None,
  build_temp = None,
  target_lang = None 
)
Link a bunch of stuff together to create an executable or
shared library file.

The "bunch of stuff" consists of the list of object files supplied
as 'objects'.  'output_filename' should be a filename.  If
'output_dir' is supplied, 'output_filename' is relative to it
(i.e. 'output_filename' can provide directory components if
needed).

'libraries' is a list of libraries to link against.  These are
library names, not filenames, since they're translated into
filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
on Unix and "foo.lib" on DOS/Windows).  However, they can include a
directory component, which means the linker will look in that
specific directory rather than searching all the normal locations.

'library_dirs', if supplied, should be a list of directories to
search for libraries that were specified as bare library names
(ie. no directory component).  These are on top of the system
default and those supplied to 'add_library_dir()' and/or
'set_library_dirs()'.  'runtime_library_dirs' is a list of
directories that will be embedded into the shared library and used
to search for other shared libraries that *it* depends on at
run-time.  (This may only be relevant on Unix.)

'export_symbols' is a list of symbols that the shared library will
export.  (This appears to be relevant only on Windows.)

'debug' is as for 'compile()' and 'create_static_lib()', with the
slight distinction that it actually matters on most platforms (as
opposed to 'create_static_lib()', which includes a 'debug' flag
mostly for form's sake).

'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
of course that they supply command-line arguments for the
particular linker being used).

'target_lang' is the target language for which the given objects
are being compiled. This allows specific linkage time treatment of
certain languages.

Raises LinkError on failure.

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 630 of file ccompiler.py.

00630 
00631              target_lang=None):
00632         """Link a bunch of stuff together to create an executable or
00633         shared library file.
00634 
00635         The "bunch of stuff" consists of the list of object files supplied
00636         as 'objects'.  'output_filename' should be a filename.  If
00637         'output_dir' is supplied, 'output_filename' is relative to it
00638         (i.e. 'output_filename' can provide directory components if
00639         needed).
00640 
00641         'libraries' is a list of libraries to link against.  These are
00642         library names, not filenames, since they're translated into
00643         filenames in a platform-specific way (eg. "foo" becomes "libfoo.a"
00644         on Unix and "foo.lib" on DOS/Windows).  However, they can include a
00645         directory component, which means the linker will look in that
00646         specific directory rather than searching all the normal locations.
00647 
00648         'library_dirs', if supplied, should be a list of directories to
00649         search for libraries that were specified as bare library names
00650         (ie. no directory component).  These are on top of the system
00651         default and those supplied to 'add_library_dir()' and/or
00652         'set_library_dirs()'.  'runtime_library_dirs' is a list of
00653         directories that will be embedded into the shared library and used
00654         to search for other shared libraries that *it* depends on at
00655         run-time.  (This may only be relevant on Unix.)
00656 
00657         'export_symbols' is a list of symbols that the shared library will
00658         export.  (This appears to be relevant only on Windows.)
00659 
00660         'debug' is as for 'compile()' and 'create_static_lib()', with the
00661         slight distinction that it actually matters on most platforms (as
00662         opposed to 'create_static_lib()', which includes a 'debug' flag
00663         mostly for form's sake).
00664 
00665         'extra_preargs' and 'extra_postargs' are as for 'compile()' (except
00666         of course that they supply command-line arguments for the
00667         particular linker being used).
00668 
00669         'target_lang' is the target language for which the given objects
00670         are being compiled. This allows specific linkage time treatment of
00671         certain languages.
00672 
00673         Raises LinkError on failure.
00674         """
00675         raise NotImplementedError
00676 

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler.link_executable (   self,
  objects,
  output_progname,
  output_dir = None,
  libraries = None,
  library_dirs = None,
  runtime_library_dirs = None,
  debug = 0,
  extra_preargs = None,
  extra_postargs = None,
  target_lang = None 
)

Definition at line 730 of file ccompiler.py.

00730 
00731                         target_lang=None):
00732         self.link(CCompiler.EXECUTABLE, objects,
00733                   self.executable_filename(output_progname), output_dir,
00734                   libraries, library_dirs, runtime_library_dirs, None,
00735                   debug, extra_preargs, extra_postargs, None, target_lang)
00736 

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler.link_shared_lib (   self,
  objects,
  output_libname,
  output_dir = None,
  libraries = None,
  library_dirs = None,
  runtime_library_dirs = None,
  export_symbols = None,
  debug = 0,
  extra_preargs = None,
  extra_postargs = None,
  build_temp = None,
  target_lang = None 
)

Definition at line 691 of file ccompiler.py.

00691 
00692                         target_lang=None):
00693         self.link(CCompiler.SHARED_LIBRARY, objects,
00694                   self.library_filename(output_libname, lib_type='shared'),
00695                   output_dir,
00696                   libraries, library_dirs, runtime_library_dirs,
00697                   export_symbols, debug,
00698                   extra_preargs, extra_postargs, build_temp, target_lang)
00699 

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler.link_shared_object (   self,
  objects,
  output_filename,
  output_dir = None,
  libraries = None,
  library_dirs = None,
  runtime_library_dirs = None,
  export_symbols = None,
  debug = 0,
  extra_preargs = None,
  extra_postargs = None,
  build_temp = None,
  target_lang = None 
)

Definition at line 712 of file ccompiler.py.

00712 
00713                            target_lang=None):
00714         self.link(CCompiler.SHARED_OBJECT, objects,
00715                   output_filename, output_dir,
00716                   libraries, library_dirs, runtime_library_dirs,
00717                   export_symbols, debug,
00718                   extra_preargs, extra_postargs, build_temp, target_lang)
00719 

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler.mkpath (   self,
  name,
  mode = 0o777 
)

Definition at line 914 of file ccompiler.py.

00914 
00915     def mkpath (self, name, mode=0o777):
00916         mkpath(name, mode, dry_run=self.dry_run)
00917 
00918 
00919 # Map a sys.platform/os.name ('posix', 'nt') to the default compiler
00920 # type for that platform. Keys are interpreted as re match
00921 # patterns. Order is important; platform mappings are preferred over
# OS names.

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler.move_file (   self,
  src,
  dst 
)

Definition at line 911 of file ccompiler.py.

00911 
00912     def move_file(self, src, dst):
00913         return move_file(src, dst, dry_run=self.dry_run)

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler.object_filenames (   self,
  source_filenames,
  strip_dir = 0,
  output_dir = '' 
)

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 846 of file ccompiler.py.

00846 
00847     def object_filenames(self, source_filenames, strip_dir=0, output_dir=''):
00848         if output_dir is None:
00849             output_dir = ''
00850         obj_names = []
00851         for src_name in source_filenames:
00852             base, ext = os.path.splitext(src_name)
00853             base = os.path.splitdrive(base)[1] # Chop off the drive
00854             base = base[os.path.isabs(base):]  # If abs, chop off leading /
00855             if ext not in self.src_extensions:
00856                 raise UnknownFileError(
00857                       "unknown file type '%s' (from '%s')" % (ext, src_name))
00858             if strip_dir:
00859                 base = os.path.basename(base)
00860             obj_names.append(os.path.join(output_dir,
00861                                           base + self.obj_extension))
00862         return obj_names

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler.preprocess (   self,
  source,
  output_file = None,
  macros = None,
  include_dirs = None,
  extra_preargs = None,
  extra_postargs = None 
)
Preprocess a single C/C++ source file, named in 'source'.
Output will be written to file named 'output_file', or stdout if
'output_file' not supplied.  'macros' is a list of macro
definitions as for 'compile()', which will augment the macros set
with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
list of directory names that will be added to the default list.

Raises PreprocessError on failure.

Definition at line 499 of file ccompiler.py.

00499 
00500                    include_dirs=None, extra_preargs=None, extra_postargs=None):
00501         """Preprocess a single C/C++ source file, named in 'source'.
00502         Output will be written to file named 'output_file', or stdout if
00503         'output_file' not supplied.  'macros' is a list of macro
00504         definitions as for 'compile()', which will augment the macros set
00505         with 'define_macro()' and 'undefine_macro()'.  'include_dirs' is a
00506         list of directory names that will be added to the default list.
00507 
00508         Raises PreprocessError on failure.
00509         """
00510         pass

Here is the call graph for this function:

Here is the caller graph for this function:

Return the compiler option to add 'dir' to the list of
directories searched for runtime libraries.

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 748 of file ccompiler.py.

00748 
00749     def runtime_library_dir_option(self, dir):
00750         """Return the compiler option to add 'dir' to the list of
00751         directories searched for runtime libraries.
00752         """
00753         raise NotImplementedError

def distutils.ccompiler.CCompiler.set_executable (   self,
  key,
  value 
)

Definition at line 153 of file ccompiler.py.

00153 
00154     def set_executable(self, key, value):
00155         if isinstance(value, str):
00156             setattr(self, key, split_quoted(value))
00157         else:
00158             setattr(self, key, value)

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.ccompiler.CCompiler.set_executables (   self,
  kwargs 
)
Define the executables (and options for them) that will be run
to perform the various stages of compilation.  The exact set of
executables that may be specified here depends on the compiler
class (via the 'executables' class attribute), but most will have:
  compiler      the C/C++ compiler
  linker_so     linker used to create shared objects and libraries
  linker_exe    linker used to create binary executables
  archiver      static library creator

On platforms with a command-line (Unix, DOS/Windows), each of these
is a string that will be split into executable name and (optional)
list of arguments.  (Splitting the string is done similarly to how
Unix shells operate: words are delimited by spaces, but quotes and
backslashes can override this.  See
'distutils.util.split_quoted()'.)

Definition at line 121 of file ccompiler.py.

00121 
00122     def set_executables(self, **kwargs):
00123         """Define the executables (and options for them) that will be run
00124         to perform the various stages of compilation.  The exact set of
00125         executables that may be specified here depends on the compiler
00126         class (via the 'executables' class attribute), but most will have:
00127           compiler      the C/C++ compiler
00128           linker_so     linker used to create shared objects and libraries
00129           linker_exe    linker used to create binary executables
00130           archiver      static library creator
00131 
00132         On platforms with a command-line (Unix, DOS/Windows), each of these
00133         is a string that will be split into executable name and (optional)
00134         list of arguments.  (Splitting the string is done similarly to how
00135         Unix shells operate: words are delimited by spaces, but quotes and
00136         backslashes can override this.  See
00137         'distutils.util.split_quoted()'.)
00138         """
00139 
00140         # Note that some CCompiler implementation classes will define class
00141         # attributes 'cpp', 'cc', etc. with hard-coded executable names;
00142         # this is appropriate when a compiler class is for exactly one
00143         # compiler/OS combination (eg. MSVCCompiler).  Other compiler
00144         # classes (UnixCCompiler, in particular) are driven by information
00145         # discovered at run-time, since there are many different ways to do
00146         # basically the same things with Unix C compilers.
00147 
00148         for key in kwargs:
00149             if key not in self.executables:
00150                 raise ValueError("unknown executable '%s' for class %s" %
00151                       (key, self.__class__.__name__))
00152             self.set_executable(key, kwargs[key])

Here is the call graph for this function:

Here is the caller graph for this function:

Set the list of directories that will be searched to 'dirs' (a
list of strings).  Overrides any preceding calls to
'add_include_dir()'; subsequence calls to 'add_include_dir()' add
to the list passed to 'set_include_dirs()'.  This does not affect
any list of standard include directories that the compiler may
search by default.

Definition at line 225 of file ccompiler.py.

00225 
00226     def set_include_dirs(self, dirs):
00227         """Set the list of directories that will be searched to 'dirs' (a
00228         list of strings).  Overrides any preceding calls to
00229         'add_include_dir()'; subsequence calls to 'add_include_dir()' add
00230         to the list passed to 'set_include_dirs()'.  This does not affect
00231         any list of standard include directories that the compiler may
00232         search by default.
00233         """
00234         self.include_dirs = dirs[:]

def distutils.ccompiler.CCompiler.set_libraries (   self,
  libnames 
)
Set the list of libraries to be included in all links driven by
this compiler object to 'libnames' (a list of strings).  This does
not affect any standard system libraries that the linker may
include by default.

Definition at line 251 of file ccompiler.py.

00251 
00252     def set_libraries(self, libnames):
00253         """Set the list of libraries to be included in all links driven by
00254         this compiler object to 'libnames' (a list of strings).  This does
00255         not affect any standard system libraries that the linker may
00256         include by default.
00257         """
00258         self.libraries = libnames[:]

Set the list of library search directories to 'dirs' (a list of
strings).  This does not affect any standard library search path
that the linker may search by default.

Definition at line 267 of file ccompiler.py.

00267 
00268     def set_library_dirs(self, dirs):
00269         """Set the list of library search directories to 'dirs' (a list of
00270         strings).  This does not affect any standard library search path
00271         that the linker may search by default.
00272         """
00273         self.library_dirs = dirs[:]

def distutils.ccompiler.CCompiler.set_link_objects (   self,
  objects 
)
Set the list of object files (or analogues) to be included in
every link to 'objects'.  This does not affect any standard object
files that the linker may include by default (such as system
libraries).

Definition at line 296 of file ccompiler.py.

00296 
00297     def set_link_objects(self, objects):
00298         """Set the list of object files (or analogues) to be included in
00299         every link to 'objects'.  This does not affect any standard object
00300         files that the linker may include by default (such as system
00301         libraries).
00302         """
00303         self.objects = objects[:]
00304 

Here is the call graph for this function:

Set the list of directories to search for shared libraries at
runtime to 'dirs' (a list of strings).  This does not affect any
standard search path that the runtime linker may search by
default.

Definition at line 280 of file ccompiler.py.

00280 
00281     def set_runtime_library_dirs(self, dirs):
00282         """Set the list of directories to search for shared libraries at
00283         runtime to 'dirs' (a list of strings).  This does not affect any
00284         standard search path that the runtime linker may search by
00285         default.
00286         """
00287         self.runtime_library_dirs = dirs[:]

def distutils.ccompiler.CCompiler.shared_object_filename (   self,
  basename,
  strip_dir = 0,
  output_dir = '' 
)

Definition at line 863 of file ccompiler.py.

00863 
00864     def shared_object_filename(self, basename, strip_dir=0, output_dir=''):
00865         assert output_dir is not None
00866         if strip_dir:
00867             basename = os.path.basename(basename)
00868         return os.path.join(output_dir, basename + self.shared_lib_extension)

def distutils.ccompiler.CCompiler.spawn (   self,
  cmd 
)

Definition at line 908 of file ccompiler.py.

00908 
00909     def spawn(self, cmd):
00910         spawn(cmd, dry_run=self.dry_run)

Here is the caller graph for this function:

Undefine a preprocessor macro for all compilations driven by
this compiler object.  If the same macro is defined by
'define_macro()' and undefined by 'undefine_macro()' the last call
takes precedence (including multiple redefinitions or
undefinitions).  If the macro is redefined/undefined on a
per-compilation basis (ie. in the call to 'compile()'), then that
takes precedence.

Definition at line 199 of file ccompiler.py.

00199 
00200     def undefine_macro(self, name):
00201         """Undefine a preprocessor macro for all compilations driven by
00202         this compiler object.  If the same macro is defined by
00203         'define_macro()' and undefined by 'undefine_macro()' the last call
00204         takes precedence (including multiple redefinitions or
00205         undefinitions).  If the macro is redefined/undefined on a
00206         per-compilation basis (ie. in the call to 'compile()'), then that
00207         takes precedence.
00208         """
00209         # Delete from the list of macro definitions/undefinitions if
00210         # already there (so that this one will take precedence).
00211         i = self._find_macro (name)
00212         if i is not None:
00213             del self.macros[i]
00214 
00215         undefn = (name,)
00216         self.macros.append(undefn)

Here is the call graph for this function:

def distutils.ccompiler.CCompiler.warn (   self,
  msg 
)

Definition at line 902 of file ccompiler.py.

00902 
00903     def warn(self, msg):
00904         sys.stderr.write("warning: %s\n" % msg)

Here is the caller graph for this function:


Member Data Documentation

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 37 of file ccompiler.py.

Definition at line 86 of file ccompiler.py.

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 69 of file ccompiler.py.

Definition at line 615 of file ccompiler.py.

Definition at line 87 of file ccompiler.py.

Definition at line 101 of file ccompiler.py.

Initial value:
{".c"   : "c",
                    ".cc"  : "c++",
                    ".cpp" : "c++",
                    ".cxx" : "c++",
                    ".m"   : "objc",
                   }

Definition at line 77 of file ccompiler.py.

list distutils.ccompiler.CCompiler.language_order = ["c++", "objc", "c"] [static]

Definition at line 83 of file ccompiler.py.

Definition at line 105 of file ccompiler.py.

Definition at line 108 of file ccompiler.py.

Definition at line 98 of file ccompiler.py.

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 64 of file ccompiler.py.

Definition at line 116 of file ccompiler.py.

Definition at line 92 of file ccompiler.py.

Definition at line 112 of file ccompiler.py.

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 66 of file ccompiler.py.

Definition at line 68 of file ccompiler.py.

Definition at line 614 of file ccompiler.py.

Definition at line 613 of file ccompiler.py.

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 63 of file ccompiler.py.

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 65 of file ccompiler.py.

Reimplemented in distutils.msvc9compiler.MSVCCompiler.

Definition at line 67 of file ccompiler.py.

Definition at line 88 of file ccompiler.py.


The documentation for this class was generated from the following file: