From 9c47ecaeb25300ac2a6a2609628ecd4c928fcf49 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Sat, 23 Dec 2023 22:51:38 -0800 Subject: 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. --- lib/spack/spack/directives.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/directives.py b/lib/spack/spack/directives.py index fcd72d5bfc..7a83c88556 100644 --- a/lib/spack/spack/directives.py +++ b/lib/spack/spack/directives.py @@ -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) -- cgit v1.2.3-70-g09d2