diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2023-12-23 22:51:38 -0800 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2023-12-27 11:20:45 -0800 |
commit | 9c47ecaeb25300ac2a6a2609628ecd4c928fcf49 (patch) | |
tree | 60223b23acb8bcb6d0ca8975a0275df3fd311791 /lib | |
parent | 19c20563cc86140aaf352d72079bd9de292be0ac (diff) | |
download | spack-9c47ecaeb25300ac2a6a2609628ecd4c928fcf49.tar.gz spack-9c47ecaeb25300ac2a6a2609628ecd4c928fcf49.tar.bz2 spack-9c47ecaeb25300ac2a6a2609628ecd4c928fcf49.tar.xz spack-9c47ecaeb25300ac2a6a2609628ecd4c928fcf49.zip |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/directives.py | 13 |
1 files changed, 10 insertions, 3 deletions
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) |