From 67da9c90b01ae1c22ae78f4401bd68e4375c2fb9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 7 Nov 2011 04:09:30 +0000 Subject: Cache version information in release tarballs. --- ext.wscript | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1