Make COPYRIGHT.txt compliant with specification

Also fix license header generation by skipping over the new Comment
field in the COPYRIGHT.txt header stanza.
This commit is contained in:
Travis Wrightsman
2025-01-17 11:24:53 -08:00
parent 9630d4e2fc
commit 72856f304f
2 changed files with 169 additions and 171 deletions

View File

@@ -200,8 +200,8 @@ def make_license_header(target, source, env):
tag, content = reader.next_tag()
if tag in ("Files", "Copyright", "License"):
part[tag] = content[:]
elif tag == "Comment":
# attach part to named project
elif tag == "Comment" and part:
# attach non-empty part to named project
projects[content[0]] = projects.get(content[0], []) + [part]
if not tag or not reader.current: