summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-04-16 17:09:38 +0100
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-04-16 17:09:38 +0100
commitcd52c82d7e97c72a421f0973941337dd7868b06a (patch)
treeaede58973da2109fe4bd1fa8a49e6d9a6cde2b75
parent9a0976b32c8362de0ad70283f5d4ab3675706564 (diff)
downloadmorph-cd52c82d7e97c72a421f0973941337dd7868b06a.tar.gz
Add Artifact documentaiton, fix morphlib module imports.
-rw-r--r--morphlib/__init__.py1
-rw-r--r--morphlib/artifact.py15
2 files changed, 15 insertions, 1 deletions
diff --git a/morphlib/__init__.py b/morphlib/__init__.py
index 0b8ef408..b66fa819 100644
--- a/morphlib/__init__.py
+++ b/morphlib/__init__.py
@@ -31,7 +31,6 @@ import builder
import cachedir
import cachedrepo
import cachekeycomputer
-import dependencyresolver
import execute
import fsutils
import git
diff --git a/morphlib/artifact.py b/morphlib/artifact.py
index 830ee1ac..e335b4cb 100644
--- a/morphlib/artifact.py
+++ b/morphlib/artifact.py
@@ -16,6 +16,21 @@
class Artifact(object):
+ '''Represent a build result generated from a source.
+
+ Has the following properties:
+
+ * ``source`` -- the source from which the artifact is built
+ * ``name`` -- the name of the artifact
+ * ``cache_key`` -- a cache key to uniquely identify the artifact
+ * ``dependencies`` -- list of Artifacts that need to be built beforehand
+ * ``dependents`` -- list of Artifacts that need this Artifact to be built
+
+ The ``dependencies`` and ``dependents`` lists MUST be modified by
+ the ``add_dependencies`` and ``add_dependent`` methods only.
+
+ '''
+
def __init__(self, source, name, cache_key):
self.source = source
self.name = name