directives: add checked_by field to license(), add some license checks

Add a "checked_by" field to the `license()` directive so that we can track who verified
the license for a project. also check the license of 18 or so projects and mark them
checked.
This commit is contained in:
Todd Gamblin
2023-12-23 22:51:38 -08:00
parent 19c20563cc
commit 9c47ecaeb2
27 changed files with 48 additions and 30 deletions

View File

@@ -912,14 +912,21 @@ def _execute_license(pkg, license_identifier: str, when):
@directive("licenses")
def license(license_identifier: str, when=None):
def license(
license_identifier: str,
checked_by: Optional[Union[str, List[str]]] = None,
when: Optional[Union[str, bool]] = None,
):
"""Add a new license directive, to specify the SPDX identifier the software is
distributed under.
Args:
license_identifiers: A list of SPDX identifiers specifying the licenses
the software is distributed under.
license_identifiers: SPDX identifier specifying the license(s) the software
is distributed under.
checked_by: string or list of strings indicating which github user checked the
license (if any).
when: A spec specifying when the license applies.
when: A spec specifying when the license applies.
"""
return lambda pkg: _execute_license(pkg, license_identifier, when)