diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2022-05-27 17:34:49 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2022-06-07 18:16:45 +0300 |
commit | f4e788e17bce36b1b4658646728fb877463c32f4 (patch) | |
tree | cfeb8c314fd458b681b831cf78e64dee57d722a6 /calm/package.py | |
parent | 51b7563055729cf836da85ccac7d731583c26392 (diff) |
Allow 'license:' key in source hint
Allow 'license:' key in source hint, and check it contains a valid SPDX
license expression.
Show the key value in source package summary page, and in repology JSON
output.
Update tests appropriately
Future work: Add 'license:' to the set of mandatory keys for a source
package.
Diffstat (limited to 'calm/package.py')
-rwxr-xr-x | calm/package.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/calm/package.py b/calm/package.py index 0b3dec8..f75be15 100755 --- a/calm/package.py +++ b/calm/package.py @@ -1212,6 +1212,9 @@ def write_repo_json(args, packages, f): if 'homepage' in po.version_hints[bv]: d['homepage'] = po.version_hints[bv]['homepage'] + if 'license' in po.version_hints[bv]: + d['license'] = po.version_hints[bv]['license'] + if pkg_maintainers[po.orig_name] and ('ORPHANED' not in pkg_maintainers[po.orig_name]): d['maintainers'] = sorted(pkg_maintainers[po.orig_name]) |