Undocumented
Function |
|
Compile one or more source files. |
Function |
|
Do any platform-specific customization of a compiler instance. |
Function |
|
Customize compiler using distutils command. |
Function |
|
Return the C++ compiler. |
Function |
|
Does nothing here, but is called by the get_version method and can be overridden by subclasses. In particular it is redefined in the FCompiler class where more documentation can be found. |
Function |
|
Return compiler version, or None if compiler is not available. |
Function |
|
Return the name of the object files for the given source files. |
Function |
|
Print the compiler customizations to stdout. |
Function |
|
Execute a command in a sub-process. |
Function | gen |
Undocumented |
Function | new |
Undocumented |
Function | replace |
Undocumented |
Function | simple |
Simple matching of version numbers, for use in CCompiler and FCompiler. |
Function | _compiler |
Undocumented |
Function | _needs |
Check if an objects needs to be rebuild based on its dependencies |
Variable | _global |
Undocumented |
Variable | _job |
Undocumented |
Variable | _m |
Undocumented |
Variable | _processing |
Undocumented |
Compile one or more source files.
Please refer to the Python distutils API reference for more details.
Parameters | |
self | Undocumented |
sources:list of str | A list of filenames |
outputstr , optional | Path to the output directory. |
macros:list of tuples | A list of macro definitions. |
includelist of str , optional | The directories to add to the default include file search path for this compilation only. |
debug:bool , optional | Whether or not to output debug symbols in or alongside the object file(s). |
extra | Extra pre- and post-arguments. |
extra | Extra pre- and post-arguments. |
depends:list of str , optional | A list of file names that all targets depend on. |
Returns | |
list of str | objects - A list of object file names, one per source file sources . |
Raises | |
CompileError | If compilation fails. |
Do any platform-specific customization of a compiler instance.
This method calls distutils.sysconfig.customize_compiler
for
platform-specific customization, as well as optionally remove a flag
to suppress spurious warnings in case C++ code is being compiled.
Notes
All the default options used by distutils can be extracted with:
from distutils import sysconfig sysconfig.get_config_vars('CC', 'CXX', 'OPT', 'BASECFLAGS', 'CCSHARED', 'LDSHARED', 'SO')
Parameters | |
self | Undocumented |
dist:object | This parameter is not used for anything. |
needbool , optional | Whether or not C++ has to be compiled. If so (True), the "-Wstrict-prototypes" option is removed to prevent spurious warnings. Default is False. |
Returns | |
None | Undocumented |
Customize compiler using distutils command.
Parameters | |
self | Undocumented |
cmd:class instance | An instance inheriting from distutils.cmd.Command . |
ignore:sequence of str , optional | List of CCompiler commands (without 'set_') that should not be
altered. Strings that are checked for are:
('include_dirs', 'define', 'undef', 'libraries', 'library_dirs',
'rpath', 'link_objects'). |
Returns | |
None | Undocumented |
Return the C++ compiler.
Parameters | |
self | Undocumented |
Returns | |
class instance | cxx - The C++ compiler, as a CCompiler instance. |
Does nothing here, but is called by the get_version method and can be
overridden by subclasses. In particular it is redefined in the FCompiler
class where more documentation can be found.
Return compiler version, or None if compiler is not available.
Parameters | |
self | Undocumented |
force:bool , optional | If True, force a new determination of the version, even if the compiler already has a version attribute. Default is False. |
oklist of int , optional | The list of status values returned by the version look-up process
for which a version string is returned. If the status value is not
in ok_status , None is returned. Default is [0]. |
Returns | |
str or None | version - Version string, in the format of distutils.version.LooseVersion . |
Return the name of the object files for the given source files.
Parameters | |
self | Undocumented |
sourcelist of str | The list of paths to source files. Paths can be either relative or absolute, this is handled transparently. |
stripbool , optional | Whether to strip the directory from the returned paths. If True,
the file name prepended by output_dir is returned. Default is False. |
outputstr , optional | If given, this path is prepended to the returned paths to the object files. |
Returns | |
list of str | obj_names - The list of paths to the object files corresponding to the source
files in source_filenames . |
Print the compiler customizations to stdout.
Notes
Printing is only done if the distutils log threshold is < 2.
Parameters | |
self | Undocumented |
Returns | |
None | Undocumented |
Execute a command in a sub-process.
Parameters | |
self | Undocumented |
cmd:str | The command to execute. |
display:str or sequence of str , optional | The text to add to the log file kept by numpy.distutils .
If not given, display is equal to cmd . |
env:a dictionary for environment variables, optional | |
Returns | |
None | Undocumented |
Raises | |
DistutilsExecError | If the command failed, i.e. the exit status was not 0. |
Simple matching of version numbers, for use in CCompiler and FCompiler.
Parameters | |
pat:str , optional | A regular expression matching version numbers. Default is r'[-.\d]+'. |
ignore:str , optional | A regular expression matching patterns to skip. Default is '', in which case nothing is skipped. |
start:str , optional | A regular expression matching the start of where to start looking
for version numbers.
Default is '', in which case searching is started at the
beginning of the version string given to matcher . |
Returns | |
callable | matcher - A function that is appropriate to use as the .version_match
attribute of a CCompiler class. matcher takes a single parameter,
a version string. |