Pavement runtime helpers

Helper functions and data structures used by pavements.

class paver.runtime.Bunch

Simple but handy collector of a bunch of named stuff.

clear()
D.clear() -> None. Remove all items from D.
copy()
D.copy() -> a shallow copy of D
get()
D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
has_key()
D.has_key(k) -> True if D has a key k, else False
items()
D.items() -> list of D’s (key, value) pairs, as 2-tuples
iteritems()
D.iteritems() -> an iterator over the (key, value) items of D
iterkeys()
D.iterkeys() -> an iterator over the keys of D
itervalues()
D.itervalues() -> an iterator over the values of D
keys()
D.keys() -> list of D’s keys
pop()
D.pop(k[,d]) -> v, remove specified key and return the corresponding value If key is not found, d is returned if given, otherwise KeyError is raised
popitem()
D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty
setdefault()
D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D
update()

D.update(E, **F) -> None. Update D from E and F: for k in E: D[k] = E[k] (if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k]

System Message: WARNING/2 (/Users/admin/projects/paver/docs/source/runtime.rst, line 69); backlink

Inline strong start-string without end-string.
values()
D.values() -> list of D’s values
paver.runtime.call_target(target_name)

Calls the desired target, including any targets upon which that target depends.

You can always call a target directly by calling the function directly. But, if you do so the dependencies aren’t called. call_target ensures that these are called.

Note that call_target will only call the target once during a given build as long as the options remain the same. If the options are changed, the target will be called again.

paver.runtime.needs(req)

Specifies targets upon which this target depends.

req can be a string or a list of strings with the names of the targets. You can call this decorator multiple times and the various requirements are added on.

The requirements are called in the order presented in the list.

paver.runtime.require_keys(keys)
A set of dotted-notation keys that must be present in the options for this target to be relevant.
paver.runtime.target(func)

Specifies that this function is a target.

Note that this decorator does not actually replace the function object. It just keeps track of the target and sets an is_target flag on the function object.