class documentation

Undocumented

Method check_func Determine if function 'func' is available by constructing a source file that refers to 'func', and compiles and links it. If everything succeeds, returns true; otherwise returns false.
Method check_header Determine if the system header file named by 'header_file' exists and can be found by the preprocessor; return true if so, false otherwise.
Method check_lib Determine if 'library' is available to be linked against, without actually checking that any particular symbols are provided by it. 'headers' will be used in constructing the source file to be compiled, but the only effect of this is to check if all the header files listed are available...
Method finalize_options Set final values for all the options that this command supports. This is always called as late as possible, ie. after any option assignments from the command-line or from other commands have been done...
Method initialize_options Set default values for all the options that this command supports. Note that these defaults may be overridden by other commands, by the setup script, by config files, or by the command-line. Thus, this is not the place to code dependencies between options; generally, 'initialize_options()' implementations are just a bunch of "self...
Method run A command's raison d'etre: carry out the action it exists to perform, controlled by the options initialized in 'initialize_options()', customized by other commands, the setup script, the command-line, and config files, and finalized in 'finalize_options()'...
Method search_cpp Construct a source file (just like 'try_cpp()'), run it through the preprocessor, and return true if any line of the output matches 'pattern'. 'pattern' should either be a compiled regex object or a string containing a regex...
Method try_compile Try to compile a source file built from 'body' and 'headers'. Return true on success, false otherwise.
Method try_cpp Construct a source file from 'body' (a string containing lines of C/C++ code) and 'headers' (a list of header files to include) and run it through the preprocessor. Return true if the preprocessor succeeded, false if there were any errors...
Method try_link Try to compile and link a source file, built from 'body' and 'headers', to executable form. Return true on success, false otherwise.
Method try_run Try to compile, link to an executable, and run a program built from 'body' and 'headers'. Return true on success, false otherwise.
Class Variable description Undocumented
Class Variable user_options Undocumented
Instance Variable cc Undocumented
Instance Variable compiler Undocumented
Instance Variable dump_source Undocumented
Instance Variable include_dirs Undocumented
Instance Variable libraries Undocumented
Instance Variable library_dirs Undocumented
Instance Variable noisy Undocumented
Instance Variable temp_files Undocumented
Method _check_compiler Check that 'self.compiler' really is a CCompiler object; if not, make it one.
Method _clean Undocumented
Method _compile Undocumented
Method _gen_temp_sourcefile Undocumented
Method _link Undocumented
Method _preprocess Undocumented

Inherited from Command:

Method __getattr__ Undocumented
Method __init__ Create and initialize a new Command object. Most importantly, invokes the 'initialize_options()' method, which is the real initializer and depends on the actual command being instantiated.
Method announce Undocumented
Method copy_file Copy a file respecting verbose, dry-run and force flags. (The former two default to whatever is in the Distribution object, and the latter defaults to false for commands that don't define it.)
Method copy_tree Copy an entire directory tree respecting verbose, dry-run, and force flags.
Method debug_print Print 'msg' to stdout if the global DEBUG (taken from the DISTUTILS_DEBUG environment variable) flag is true.
Method dump_options Undocumented
Method ensure_dirname Undocumented
Method ensure_filename Ensure that 'option' is the name of an existing file.
Method ensure_finalized Undocumented
Method ensure_string Ensure that 'option' is a string; if not defined, set it to 'default'.
Method ensure_string_list Ensure that 'option' is a list of strings. If 'option' is currently a string, we split it either on /,\s*/ or /\s+/, so "foo bar baz", "foo,bar,baz", and "foo, bar baz" all become ["foo", "bar", "baz"].
Method execute Undocumented
Method get_command_name Undocumented
Method get_finalized_command Wrapper around Distribution's 'get_command_obj()' method: find (create if necessary and 'create' is true) the command object for 'command', call its 'ensure_finalized()' method, and return the finalized command object.
Method get_sub_commands Determine the sub-commands that are relevant in the current distribution (ie., that need to be run). This is based on the 'sub_commands' class attribute: each tuple in that list may include a method that we call to determine if the subcommand needs to be run for the current distribution...
Method make_archive Undocumented
Method make_file Special case of 'execute()' for operations that process one or more input files and generate one output file. Works just like 'execute()', except the operation is skipped and a different message printed if 'outfile' already exists and is newer than all files listed in 'infiles'...
Method mkpath Undocumented
Method move_file Move a file respecting dry-run flag.
Method reinitialize_command Undocumented
Method run_command Run some other command: uses the 'run_command()' method of Distribution, which creates and finalizes the command object if necessary and then invokes its 'run()' method.
Method set_undefined_options Set the values of any "undefined" options from corresponding option values in some other command object. "Undefined" here means "is None", which is the convention used to indicate that an option has not been changed between 'initialize_options()' and 'finalize_options()'...
Method spawn Spawn an external command respecting dry-run flag.
Method warn Undocumented
Class Variable sub_commands Undocumented
Instance Variable distribution Undocumented
Instance Variable finalized Undocumented
Instance Variable force Undocumented
Instance Variable help Undocumented
Instance Variable verbose Undocumented
Method _ensure_stringlike Undocumented
Method _ensure_tested_string Undocumented
Instance Variable _dry_run Undocumented
def check_func(self, func, headers=None, include_dirs=None, libraries=None, library_dirs=None, decl=0, call=0): (source)

Determine if function 'func' is available by constructing a source file that refers to 'func', and compiles and links it. If everything succeeds, returns true; otherwise returns false. The constructed source file starts out by including the header files listed in 'headers'. If 'decl' is true, it then declares 'func' (as "int func()"); you probably shouldn't supply 'headers' and set 'decl' true in the same call, or you might get errors about a conflicting declarations for 'func'. Finally, the constructed 'main()' function either references 'func' or (if 'call' is true) calls it. 'libraries' and 'library_dirs' are used when linking.

def check_header(self, header, include_dirs=None, library_dirs=None, lang='c'): (source)

Determine if the system header file named by 'header_file' exists and can be found by the preprocessor; return true if so, false otherwise.

def check_lib(self, library, library_dirs=None, headers=None, include_dirs=None, other_libraries=[]): (source)

Determine if 'library' is available to be linked against, without actually checking that any particular symbols are provided by it. 'headers' will be used in constructing the source file to be compiled, but the only effect of this is to check if all the header files listed are available. Any libraries listed in 'other_libraries' will be included in the link, in case 'library' has symbols that depend on other libraries.

def finalize_options(self): (source)

Set final values for all the options that this command supports. This is always called as late as possible, ie. after any option assignments from the command-line or from other commands have been done. Thus, this is the place to code option dependencies: if 'foo' depends on 'bar', then it is safe to set 'foo' from 'bar' as long as 'foo' still has the same value it was assigned in 'initialize_options()'. This method must be implemented by all command classes.

def initialize_options(self): (source)

Set default values for all the options that this command supports. Note that these defaults may be overridden by other commands, by the setup script, by config files, or by the command-line. Thus, this is not the place to code dependencies between options; generally, 'initialize_options()' implementations are just a bunch of "self.foo = None" assignments. This method must be implemented by all command classes.

def run(self): (source)

A command's raison d'etre: carry out the action it exists to perform, controlled by the options initialized in 'initialize_options()', customized by other commands, the setup script, the command-line, and config files, and finalized in 'finalize_options()'. All terminal output and filesystem interaction should be done by 'run()'. This method must be implemented by all command classes.

def search_cpp(self, pattern, body=None, headers=None, include_dirs=None, lang='c'): (source)

Construct a source file (just like 'try_cpp()'), run it through the preprocessor, and return true if any line of the output matches 'pattern'. 'pattern' should either be a compiled regex object or a string containing a regex. If both 'body' and 'headers' are None, preprocesses an empty file -- which can be useful to determine the symbols the preprocessor and compiler set by default.

def try_compile(self, body, headers=None, include_dirs=None, lang='c'): (source)

Try to compile a source file built from 'body' and 'headers'. Return true on success, false otherwise.

def try_cpp(self, body=None, headers=None, include_dirs=None, lang='c'): (source)

Construct a source file from 'body' (a string containing lines of C/C++ code) and 'headers' (a list of header files to include) and run it through the preprocessor. Return true if the preprocessor succeeded, false if there were any errors. ('body' probably isn't of much use, but what the heck.)

def try_link(self, body, headers=None, include_dirs=None, libraries=None, library_dirs=None, lang='c'): (source)

Try to compile and link a source file, built from 'body' and 'headers', to executable form. Return true on success, false otherwise.

def try_run(self, body, headers=None, include_dirs=None, libraries=None, library_dirs=None, lang='c'): (source)

Try to compile, link to an executable, and run a program built from 'body' and 'headers'. Return true on success, false otherwise.

description: str = (source)

Undocumented

user_options: list = (source)

Undocumented

Undocumented

compiler = (source)

Undocumented

dump_source: int = (source)

Undocumented

include_dirs = (source)

Undocumented

libraries: list = (source)

Undocumented

library_dirs: list = (source)

Undocumented

Undocumented

temp_files: list = (source)

Undocumented

def _check_compiler(self): (source)

Check that 'self.compiler' really is a CCompiler object; if not, make it one.

def _clean(self, *filenames): (source)

Undocumented

def _compile(self, body, headers, include_dirs, lang): (source)

Undocumented

def _gen_temp_sourcefile(self, body, headers, lang): (source)

Undocumented

def _link(self, body, headers, include_dirs, libraries, library_dirs, lang): (source)

Undocumented

def _preprocess(self, body, headers, include_dirs, lang): (source)

Undocumented