Previous topic

The soclib builder module

Next topic

Building block

This Page

Builder todo list

class soclib_builder.todo.ToDo

A to-do list. From a list of soclib_builder.bblock.BBlock objects, retrieve all involved soclib_builder.action.Action objects, and permit to:

  • run them, possibly in parallel, with a limit of parallel processes,
  • clean products.

Action objects are automatically retrieved from their associated soclib_builder.bblock.BBlock objects.

__init__(*dests)

Creates a new to-do list with an arbitrary list of build blocks to do.

Parameters:dests – arbitrary list of BBlock that are the products to do
add(*dests)

Adds an arbitraty list of build blocks to the todo list.

Parameters:dests – arbitrary list of BBlock that are the products to do
prepare()

Prepare the list of actions to perform. Compute the dependencies, order the building blocks by dependencies, order the actions.

clean()

Delete all products of all actions.

process()

Build all dests associated to this to-do list. This method either returns with all products done and no error, or raises an exception of a failed action.

Returns:None
Raises :Build failure