diff options
author | David Robillard <d@drobilla.net> | 2020-02-16 16:34:26 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-02-16 17:15:42 +0100 |
commit | 060ba3993e8ebd1c760d18dee1419df560855765 (patch) | |
tree | ae80844fe42e4691c28df7669b250748c3a55028 /extras/autoship.py | |
parent | c5656f7e9e4174303fa13d0ed7219eb8025bbdf4 (diff) | |
download | autowaf-060ba3993e8ebd1c760d18dee1419df560855765.tar.gz autowaf-060ba3993e8ebd1c760d18dee1419df560855765.tar.bz2 autowaf-060ba3993e8ebd1c760d18dee1419df560855765.zip |
Get doap:name from first NEWS entry if it is not already present
Diffstat (limited to 'extras/autoship.py')
-rwxr-xr-x | extras/autoship.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/extras/autoship.py b/extras/autoship.py index 6850d34..4a82bcf 100755 --- a/extras/autoship.py +++ b/extras/autoship.py @@ -300,6 +300,11 @@ def write_ttl_news(entries, out_file, template=None, subject_uri=None): subject = g.value(None, rdf.type, doap.Project) ensure(subject is not None, "Unable to find project URI for subject") + # Get doap:name from first NEWS entry if it is not already present + if g.value(subject, doap.name, None) is None: + first_entry = next(iter(entries.values())) + g.add((subject, doap.name, rdflib.Literal(first_entry["name"]))) + # Get maintainer maintainer = g.value(subject, doap.maintainer, None) if not maintainer: |