A build block. This is either a input or a product of a soclib_builder.action.Action. They may be associated to a file or not, depending on Action needs.
Build blocks associated to files are indexed in a global registry, and are merged when used from different Action objects. A BBlock can tell what actions are considered user or producer of itself.
Build blocks which are products have to be passed to soclib_builder.todo.ToDo.
Creates a new bblock, associated to a filename, and a generator.
Generator is a soclib_builder.action.Action responsible for creating the file on demand.
Parameters: |
|
---|
Marks the associated file as changed.
List of actions which are dependant from this bblock
Add a given soclib_builder.action.Action object as user.
Parameters: | user – a soclib_builder.action.Action |
---|
Returns: | whether the associated path is a directory. |
---|
Returns: | the modification time of associated file |
---|
Delete the underlying file in the filesystem.
Prepare the dependency list of the bblock. Must be called between the registration of users and the evaluation of dependencies.
Tells whether this bblock needs another one as dependency.
Parameters: | other – another soclib_builder.bblock.BBlock object |
---|---|
Returns: | True or False |
A bblock that is anonymous.
Creates a new anonymous bblock associated to a generator. An anonymous bblock with no generator is irrelevant.
Parameters: | generator – a soclib_builder.action.Action object. |
---|