module documentation

distutils.ccompiler Contains CCompiler, an abstract base class that defines the interface for the Distutils compiler abstraction model.

Class CCompiler 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.
Function gen_lib_options Generate linker options for searching library directories and linking with specific libraries. 'libraries' and 'library_dirs' are, respectively, lists of library names (not filenames!) and search directories...
Function gen_preprocess_options Generate C pre-processor options (-D, -U, -I) as used by at least two types of compilers: the typical Unix compiler and Visual C++. 'macros' is the usual thing, a list of 1- or 2-tuples, where (name,) means undefine (-U) macro 'name', and (name,value) means define (-D) macro 'name' to 'value'...
Function get_default_compiler Determine the default compiler to use for the given platform.
Function new_compiler Generate an instance of some CCompiler subclass for the supplied platform/compiler combination. 'plat' defaults to 'os.name' (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler for that platform...
Function show_compilers Print list of available compilers (used by the "--help-compiler" options to "build", "build_ext", "build_clib").
Variable compiler_class Undocumented
Variable _default_compilers Undocumented
def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries): (source)

Generate linker options for searching library directories and linking with specific libraries. 'libraries' and 'library_dirs' are, respectively, lists of library names (not filenames!) and search directories. Returns a list of command-line options suitable for use with some compiler (depending on the two format strings passed in).

def gen_preprocess_options(macros, include_dirs): (source)

Generate C pre-processor options (-D, -U, -I) as used by at least two types of compilers: the typical Unix compiler and Visual C++. 'macros' is the usual thing, a list of 1- or 2-tuples, where (name,) means undefine (-U) macro 'name', and (name,value) means define (-D) macro 'name' to 'value'. 'include_dirs' is just a list of directory names to be added to the header file search path (-I). Returns a list of command-line options suitable for either Unix compilers or Visual C++.

def get_default_compiler(osname=None, platform=None): (source)

Determine the default compiler to use for the given platform. osname should be one of the standard Python OS names (i.e. the ones returned by os.name) and platform the common value returned by sys.platform for the platform in question. The default values are os.name and sys.platform in case the parameters are not given.

def new_compiler(plat=None, compiler=None, verbose=0, dry_run=0, force=0): (source)

Generate an instance of some CCompiler subclass for the supplied platform/compiler combination. 'plat' defaults to 'os.name' (eg. 'posix', 'nt'), and 'compiler' defaults to the default compiler for that platform. Currently only 'posix' and 'nt' are supported, and the default compilers are "traditional Unix interface" (UnixCCompiler class) and Visual C++ (MSVCCompiler class). Note that it's perfectly possible to ask for a Unix compiler object under Windows, and a Microsoft compiler object under Unix -- if you supply a value for 'compiler', 'plat' is ignored.

def show_compilers(): (source)

Print list of available compilers (used by the "--help-compiler" options to "build", "build_ext", "build_clib").

compiler_class: dict = (source)

Undocumented

_default_compilers: tuple = (source)

Undocumented