Package _setup :: Module ext :: Class BuildExt
[hide private]
[frames] | no frames]

Class BuildExt

source code

            distutils.cmd.Command --+    
                                    |    
distutils.command.build_ext.build_ext --+
                                        |
                                       BuildExt

Extended extension builder class

This class allows extensions to provide a check_prerequisites method which is called before actually building it. The method takes the BuildExt instance and returns whether the extension should be skipped or not.

Instance Methods [hide private]
any
build_extension(self, ext)
Build C extension - with extended functionality
source code

Inherited from distutils.command.build_ext.build_ext: build_extensions, check_extensions_list, finalize_options, find_swig, get_export_symbols, get_ext_filename, get_ext_fullname, get_ext_fullpath, get_libraries, get_outputs, get_source_files, initialize_options, run, swig_sources

Inherited from distutils.cmd.Command: __getattr__, __init__, announce, copy_file, copy_tree, debug_print, dump_options, ensure_dirname, ensure_filename, ensure_finalized, ensure_string, ensure_string_list, execute, get_command_name, get_finalized_command, get_sub_commands, make_archive, make_file, mkpath, move_file, reinitialize_command, run_command, set_undefined_options, spawn, warn

Inherited from distutils.cmd.Command (private): _ensure_stringlike, _ensure_tested_string

Class Variables [hide private]

Inherited from distutils.command.build_ext.build_ext: boolean_options, description, help_options, sep_by, user_options

Inherited from distutils.cmd.Command: sub_commands

Method Details [hide private]

build_extension(self, ext)

source code 

Build C extension - with extended functionality

The following features are added here:

  • ext.check_prerequisites is called before the extension is being built. See Extension for details. If the method does not exist, simply no check will be run.
  • The macros EXT_PACKAGE and EXT_MODULE will be filled (or unset) depending on the extensions name, but only if they are not already defined.
  • the include subdirectory is added to the include path
Parameters:
  • ext (Extension) - The extension to build. If it's a pure distutils.core.Extension, simply no prequisites check is applied.
Returns: any
whatever distutils.command.build_ext.build_ext returns
Overrides: distutils.command.build_ext.build_ext.build_extension