summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/directives.py13
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)