aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-02-11 22:01:34 +0000
committerDavid Robillard <d@drobilla.net>2012-02-11 22:01:34 +0000
commitba85fd0807e40ca157dc6605e23af4359c3ad081 (patch)
treef3dd3ac7f8073277fc5754a8cada23e44de31c75
parentf8d6cdaf9852fb6d9cfbd68dcef50caeaf8dc277 (diff)
downloadlv2-ba85fd0807e40ca157dc6605e23af4359c3ad081.tar.xz
Move NEWS generation stuff up into autowaf.
Add top-level news target to generate all NEWS files. Upgrade to waf-1.6.11. Upgrade to r66/autowaf.
-rw-r--r--ext.wscript58
l---------[-rwxr-xr-x]lv2/lv2plug.in/ns/lv2core/wafbin91475 -> 15 bytes
-rw-r--r--lv2/lv2plug.in/ns/lv2core/wscript63
-rwxr-xr-xwafbin91475 -> 91671 bytes
-rw-r--r--wscript18
5 files changed, 35 insertions, 104 deletions
diff --git a/ext.wscript b/ext.wscript
index dd46a5f..485f310 100644
--- a/ext.wscript
+++ b/ext.wscript
@@ -178,54 +178,11 @@ def test(ctx):
autowaf.run_tests(ctx, APPNAME, ['%s-test' % info.NAME], dirs=['.'])
autowaf.post_test(ctx, APPNAME, dirs=['.'])
-def write_news():
- import rdflib
- import textwrap
- from time import strftime, strptime
-
- doap = rdflib.Namespace('http://usefulinc.com/ns/doap#')
- dcs = rdflib.Namespace('http://ontologi.es/doap-changeset#')
- rdfs = rdflib.Namespace('http://www.w3.org/2000/01/rdf-schema#')
- foaf = rdflib.Namespace('http://xmlns.com/foaf/0.1/')
- rdf = rdflib.Namespace('http://www.w3.org/1999/02/22-rdf-syntax-ns#')
-
- m = rdflib.ConjunctiveGraph()
-
- try:
- for i in glob.glob('*.ttl'):
- m.parse(i, format='n3')
- except:
- print('warning: error parsing data, unable to generate NEWS')
- return
-
- spec = m.value(None, rdf.type, doap.Project)
-
- entries = {}
- for r in m.triples([spec, doap.release, None]):
- release = r[2]
- revision = m.value(release, doap.revision, None) or '9999'
- date = m.value(release, doap.created, None) or '9999-01-01'
- blamee = m.value(release, dcs.blame, None)
- changeset = m.value(release, dcs.changeset, None)
-
- entry = '%s (%s) stable;\n' % (APPNAME, revision)
-
- if changeset:
- for i in m.triples([changeset, dcs.item, None]):
- entry += '\n * ' + '\n '.join(
- textwrap.wrap(m.value(i[2], rdfs.label, None), width=79))
-
- entry += '\n\n -- %s <%s> %s\n\n' % (
- m.value(blamee, foaf.name, None),
- m.value(blamee, foaf.mbox, None).replace('mailto:', ''),
- strftime('%a, %d %b %Y %H:%M:%S +0000', strptime(date, '%Y-%m-%d')))
-
- entries[revision] = entry
-
- news = open('NEWS', 'w')
- for e in sorted(entries.keys(), reverse=True):
- news.write(entries[e])
- news.close()
+def news(ctx):
+ path = ctx.path.abspath()
+ autowaf.write_news(APPNAME,
+ glob.glob(os.path.join(path, '*.ttl')),
+ os.path.join(path, 'NEWS'))
class Dist(Scripting.Dist):
fun = 'dist'
@@ -233,6 +190,9 @@ class Dist(Scripting.Dist):
def get_tar_path(self, node):
"Resolve symbolic links to avoid broken links in tarball."
+ print "TAR PATH %s => %s" % (node.abspath(),
+ os.path.realpath(node.abspath()))
+
return os.path.realpath(node.abspath())
def archive(self):
@@ -244,7 +204,7 @@ class Dist(Scripting.Dist):
lv2extinfo_py.close()
# Write NEWS file
- write_news()
+ news(self)
# Build distribution
Scripting.Dist.archive(self)
diff --git a/lv2/lv2plug.in/ns/lv2core/waf b/lv2/lv2plug.in/ns/lv2core/waf
index 907b984..b955110 100755..120000
--- a/lv2/lv2plug.in/ns/lv2core/waf
+++ b/lv2/lv2plug.in/ns/lv2core/waf
Binary files differ
diff --git a/lv2/lv2plug.in/ns/lv2core/wscript b/lv2/lv2plug.in/ns/lv2core/wscript
index bb76b13..5e678b6 100644
--- a/lv2/lv2plug.in/ns/lv2core/wscript
+++ b/lv2/lv2plug.in/ns/lv2core/wscript
@@ -38,53 +38,11 @@ def configure(conf):
autowaf.display_msg(conf, "LV2 bundle directory", conf.env['LV2DIR'])
print('')
-def write_news(doap_file):
- import rdflib
- import textwrap
- from time import strftime, strptime
-
- doap = rdflib.Namespace('http://usefulinc.com/ns/doap#')
- dcs = rdflib.Namespace('http://ontologi.es/doap-changeset#')
- rdfs = rdflib.Namespace('http://www.w3.org/2000/01/rdf-schema#')
- foaf = rdflib.Namespace('http://xmlns.com/foaf/0.1/')
- rdf = rdflib.Namespace('http://www.w3.org/1999/02/22-rdf-syntax-ns#')
-
- m = rdflib.ConjunctiveGraph()
-
- try:
- m.parse(doap_file, format='n3')
- except:
- print('warning: %s not found, unable to generate NEWS' % doap_file)
- return
-
- spec = m.value(None, rdf.type, doap.Project)
-
- entries = {}
- for r in m.triples([spec, doap.release, None]):
- release = r[2]
- revision = m.value(release, doap.revision, None) or '9999'
- date = m.value(release, doap.created, None) or '9999-01-01'
- blamee = m.value(release, dcs.blame, None)
- changeset = m.value(release, dcs.changeset, None)
-
- entry = '%s (%s) stable;\n' % (APPNAME, revision)
-
- if changeset:
- for i in m.triples([changeset, dcs.item, None]):
- entry += '\n * ' + '\n '.join(
- textwrap.wrap(m.value(i[2], rdfs.label, None), width=79))
-
- entry += '\n\n -- %s <%s> %s\n\n' % (
- m.value(blamee, foaf.name, None),
- m.value(blamee, foaf.mbox, None).replace('mailto:', ''),
- strftime('%a, %d %b %Y %H:%M:%S +0000', strptime(date, '%Y-%m-%d')))
-
- entries[revision] = entry
-
- news = open('NEWS', 'w')
- for e in sorted(entries.keys(), reverse=True):
- news.write(entries[e])
- news.close()
+def news(ctx):
+ path = ctx.path.abspath()
+ autowaf.write_news(APPNAME,
+ glob.glob(os.path.join(path, '*.ttl')),
+ os.path.join(path, 'NEWS'))
def build(bld):
# Header "library"
@@ -118,11 +76,16 @@ class Dist(Scripting.Dist):
fun = 'dist'
cmd = 'dist'
+ def get_tar_path(self, node):
+ "Resolve symbolic links to avoid broken links in tarball."
+ print "TAR PATH %s => %s" % (node.abspath(),
+ os.path.realpath(node.abspath()))
+
+ return os.path.realpath(node.abspath())
+
def archive(self):
- pprint.pprint(self.exec_dict['bld'].__dict__)
- print os.path.abspath(top)
# Write NEWS file
- write_news('lv2core.doap.ttl')
+ news(self)
# Build distribution
Scripting.Dist.archive(self)
diff --git a/waf b/waf
index 907b984..56ec822 100755
--- a/waf
+++ b/waf
Binary files differ
diff --git a/wscript b/wscript
index cfe5aab..bc58b34 100644
--- a/wscript
+++ b/wscript
@@ -34,6 +34,14 @@ def options(opt):
for i in ['lv2/lv2plug.in/ns/lv2core']:
opt.recurse(i)
+def get_subdirs(with_plugins=True):
+ subdirs = ['lv2/lv2plug.in/ns/lv2core/']
+ subdirs += glob.glob('lv2/lv2plug.in/ns/ext/*/')
+ subdirs += glob.glob('lv2/lv2plug.in/ns/extensions/*/')
+ if with_plugins:
+ subdirs += glob.glob('plugins/*/')
+ return subdirs
+
def configure(conf):
conf.load('compiler_cc')
conf.load('compiler_cxx')
@@ -42,10 +50,7 @@ def configure(conf):
conf.env.append_unique('CFLAGS', '-std=c99')
- subdirs = ['lv2/lv2plug.in/ns/lv2core/']
- subdirs += glob.glob('lv2/lv2plug.in/ns/ext/*/')
- subdirs += glob.glob('lv2/lv2plug.in/ns/extensions/*/')
- subdirs += glob.glob('plugins/*/')
+ subdirs = get_subdirs()
for i in subdirs:
conf.recurse(i)
@@ -303,7 +308,10 @@ def release(ctx):
Logs.error('Error building %s release' % (name, e))
subprocess.call(['./waf', 'distclean'], cwd=dir)
-
+
+def news(ctx):
+ ctx.recurse(get_subdirs(False))
+
def lint(ctx):
for i in (['lv2/lv2plug.in/ns/lv2core/lv2.h']
+ glob.glob('lv2/lv2plug.in/ns/ext/*/*.h')