Most methods are of the form 'def meth(self):' without any parameters
there are many of them, and they do many different things: * task
creation * task results installation * environment modification *
attribute addition/removal
The inheritance approach is complicated * mixing several languages at
once * subclassing is needed even for small changes * inserting new
methods is complicated
This new class uses a configuration table: * adding new methods easily
* obtaining the order in which to call the methods * postponing the
method calls (post() -> apply)
Additionally, a 'traits' static attribute is provided: * this list
contains methods * the methods can remove or add methods from self.meths
Example1: the attribute 'staticlib' is set on an instance a method set in
the list of traits is executed when the instance is posted, it finds that
flag and adds another method for execution Example2: a method set in the
list of traits finds the msvc compiler (from self.env['MSVC']==1); more
methods are added to self.meths
|
|
__init__(self,
*kw,
**kwargs)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
|
|
|
|
|
|
to_list(self,
value)
helper: returns a list |
source code
|
|
|
|
|
|
|
apply(self)
order the methods to execute using self.prec or task_gen.prec |
source code
|
|
|
|
post(self)
runs the code to create the tasks, do not subclass |
source code
|
|
|
|
|
|
|
|
|
|
find_sources_in_dirs(self,
dirnames,
excludes=[],
exts=[])
subclass if necessary |
source code
|
|
|
|
|
|
|
get_inst_path(self)
return a default parameter if provided |
source code
|
|
|
|
|
|
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__
|