summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-12-21 23:41:31 +0000
committerCarl Hetherington <cth@carlh.net>2014-12-21 23:41:31 +0000
commit9f5dea76c13b965ea2ccfccf1ab4f56bddeb5592 (patch)
tree50e1eb625b32b7ab5e3150953730f89e2f0b09dc
parent8ccfc0cf9d8702add429547c357cc39d8199cd32 (diff)
Re-instate Project.version.
-rwxr-xr-xcdist12
1 files changed, 8 insertions, 4 deletions
diff --git a/cdist b/cdist
index 74d04da..61e19c6 100755
--- a/cdist
+++ b/cdist
@@ -504,6 +504,7 @@ class Project(object):
def __init__(self, name, specifier=None):
self.name = name
+ self.version = version
self.specifier = specifier
self.git_commit = None
if self.specifier is None:
@@ -524,11 +525,14 @@ class Project(object):
proj = '%s/src/%s' % (target.directory, self.name)
- self.read_cscript('%s/cscript' % proj)
-
- def read_cscript(self, s):
self.cscript = {}
- execfile(s, self.cscript)
+ execfile('%s/cscript' % proj, self.cscript)
+
+ if os.path.exists('%s/wscript' % proj):
+ v = read_wscript_variable(proj, "VERSION");
+ if v is not None:
+ self.version = Version(v)
+
def set_version_in_wscript(version):
f = open('wscript', 'rw')