The artefact class
An artefact is generated by an action. In a fabscript artefacts are typically created by invoking a rule that declares how to generate an artefact using an action. The artefact class may be subclassed, to change its behaviour (e.g. how it reports its update) or to allow it to have additional internal state (e.g., for composite artefacts that require intermediate steps to be built).
attributes
-
intermediate
-
notfile
notfile artefacts do not have corresponding files in the file system, thus whether or not they require being updated cannot be determined from a file's timestamp.
-
always
Never consider this artefact up to date.
Constructor
-
artefact
(name, attrs=0, features=(), use=(), condition=None) Construct an artefact.
- Parameters
name (string) -- the artefact's name
attrs (int) -- attributes
features -- Set of artefact-specific features to add.
use -- Set of features to be exported to other artefacts using this as a source.
condition -- Condition in case this artefact is conditional.
Call operator
-
artefact.
__call__
(features) Clone this artefact, and apply new features.
Attributes
-
name
The artefact's name, as set in the constructor.
-
qname
The artefact's qualified name, i.e. the name prefixed with the (qualified) name of the module it was defined in.
-
filename
The artefact's filename, if the artefact is a file.
Methods
-
artefact.
__status__
(status)
Examples
a = rule('a', recipe=fileutils.touch)