F2x.distutils.command.build_ext module

F2x implementation of the build_ext command for distutils (setup.py).

This implementation basically inserts some interaction points. Namely, it calls prepare_build_extension, finish_build_extension, and get_ext_filename. It also ensures that a build strategy is available.

See also

F2x.distutils.strategy.base

Details about the build process and build strategies are documented in the documentation of the base BuildStrategy.

class F2x.distutils.command.build_ext.build_ext(dist)

Bases: numpy.distutils.command.build_ext.build_ext

build_extension(ext)
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. 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.

get_ext_filename(ext_name)

Convert the name of an extension (eg. “foo.bar”) into the name of the file from which it will be loaded (eg. “foo/bar.so”, or “foobar.pyd”).

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.foo = None” assignments.

This method must be implemented by all command classes.

F2x.distutils.command.build_ext.get_strategy()

D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.