summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-12-21 23:06:15 +0000
committerCarl Hetherington <cth@carlh.net>2014-12-21 23:06:15 +0000
commit8ccfc0cf9d8702add429547c357cc39d8199cd32 (patch)
tree2f3458c7e718bdaf8c9617c5fa637687d186b9a1
parent518117bc29bb2293a6524159344a43d4df61efc8 (diff)
Remove Project.version; some comments.
-rwxr-xr-xcdist21
1 files changed, 13 insertions, 8 deletions
diff --git a/cdist b/cdist
index 543b18a..74d04da 100755
--- a/cdist
+++ b/cdist
@@ -223,12 +223,16 @@ class Version:
#
class Target(object):
- # @param directory directory to work in; if None we will use a temporary directory
- # Temporary directories will be removed after use; specified directories will not
+ """
+ platform -- platform string (e.g. 'windows', 'linux', 'osx')
+ directory -- directory to work in; if None we will use a temporary directory
+ Temporary directories will be removed after use; specified directories will not.
+ """
def __init__(self, platform, directory=None):
self.platform = platform
self.parallel = int(config.get('parallel'))
+ # self.directory is the working directory
if directory is None:
self.directory = tempfile.mkdtemp('', 'tmp', TEMPORARY_DIRECTORY)
self.rmdir = True
@@ -491,9 +495,15 @@ def target_factory(s, debug, work):
#
class Project(object):
+ """Description of a project. This class is never exposed to cscripts.
+ Attributes:
+ name -- name of git repository (without the .git)
+ specifier -- git tag or revision to use
+ git_commit -- git revision that is actually being used
+ """
+
def __init__(self, name, specifier=None):
self.name = name
- self.version = None
self.specifier = specifier
self.git_commit = None
if self.specifier is None:
@@ -515,11 +525,6 @@ class Project(object):
proj = '%s/src/%s' % (target.directory, self.name)
self.read_cscript('%s/cscript' % proj)
-
- if os.path.exists('%s/wscript' % proj):
- v = read_wscript_variable(proj, "VERSION");
- if v is not None:
- self.version = Version(v)
def read_cscript(self, s):
self.cscript = {}