aboutsummaryrefslogtreecommitdiffstats
path: root/ext.wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-11-07 04:09:30 +0000
committerDavid Robillard <d@drobilla.net>2011-11-07 04:09:30 +0000
commit67da9c90b01ae1c22ae78f4401bd68e4375c2fb9 (patch)
tree31cc49b93060f1a25b4bbc4834c10e3258ab082c /ext.wscript
parentf432cf9c881b2e92bde3a282aff28e9420cd6c15 (diff)
downloadlv2-67da9c90b01ae1c22ae78f4401bd68e4375c2fb9.tar.xz
Cache version information in release tarballs.
Diffstat (limited to 'ext.wscript')
-rw-r--r--ext.wscript21
1 files changed, 20 insertions, 1 deletions
diff --git a/ext.wscript b/ext.wscript
index 2004a97..91c4524 100644
--- a/ext.wscript
+++ b/ext.wscript
@@ -36,7 +36,7 @@ except:
'MINOR' : int(m.value(spec, lv2.minorVersion, None)),
'MICRO' : int(m.value(spec, lv2.microVersion, None)),
'URI' : str(spec),
- 'PKGNAME' : 'lv2-' + spec.replace('http://', '').replace('/', '-'),
+ 'PKGNAME' : str('lv2-' + spec.replace('http://', '').replace('/', '-')),
'SHORTDESC' : str(m.value(spec, doap.shortdesc, None))})
except:
@@ -113,3 +113,22 @@ def build(bld):
else:
bld.symlink_as(os.path.join(include_dir, info.NAME),
os.path.relpath(bundle_dir, include_dir))
+
+class Dist(Scripting.Dist):
+ def execute(self):
+ # Generate lv2extinfo.py in source tree
+ lv2extinfo_py = open('lv2extinfo.py', 'w')
+ for i in info.__dict__:
+ if i.isupper():
+ lv2extinfo_py.write("%s = %s\n" % (i, repr(info.__dict__[i])))
+ lv2extinfo_py.close()
+
+ # Build distribution
+ Scripting.Dist.execute(self)
+
+ # Delete lv2extinfo.py from source tree
+ try:
+ os.remove('lv2extinfo.py')
+ os.remove('lv2extinfo.pyc')
+ except:
+ pass