@@ -384,6 +384,15 @@ class PackageLicenseConcluded(SPDXEntryMaybeStr):
384
384
json_entry_key = "licenseConcluded"
385
385
386
386
387
+ class PackageLicenseComments (SPDXEntryMaybeStrMultilines ):
388
+ """Cecord background information or analysis for the Concluded License.
389
+
390
+ See 7.16 Comments on license field
391
+ """
392
+
393
+ json_entry_key = "licenseComments"
394
+
395
+
387
396
class PackageLicenseDeclared (SPDXEntryMaybeStr ):
388
397
"""Contain the license having been declared by the authors of the package.
389
398
@@ -417,7 +426,7 @@ class ExternalRef(SPDXEntry):
417
426
See 7.21 External reference field
418
427
"""
419
428
420
- json_entry_key = "external-refs "
429
+ json_entry_key = "externalRefs "
421
430
422
431
def __init__ (
423
432
self ,
@@ -624,6 +633,7 @@ class Package(SPDXSection):
624
633
copyright_text : PackageCopyrightText
625
634
files_analyzed : FilesAnalyzed
626
635
license_concluded : PackageLicenseConcluded
636
+ license_comments : PackageLicenseComments | None
627
637
license_declared : PackageLicenseDeclared | None
628
638
download_location : PackageDownloadLocation
629
639
external_refs : list [ExternalRef ] | None
@@ -695,6 +705,7 @@ def add_package(
695
705
download_location : str ,
696
706
files_analyzed : bool ,
697
707
copyright_text : str ,
708
+ license_comments : str | None = None ,
698
709
license_declared : str | None = None ,
699
710
is_main_package : bool = False ,
700
711
add_relationship : bool = True ,
@@ -707,6 +718,7 @@ def add_package(
707
718
:param file_name: the actual file name of the package
708
719
:param checksum: the package checksum (see SHA1, SHA256 classes)
709
720
:param license_concluded: the license concluded as govering the package
721
+ :param license_comments: comments for the license_concluded field
710
722
:param license_declared: the license declared in the package
711
723
:param supplier: actual distribution source for the package
712
724
:param originator: this field identifies from where or whom the package
@@ -753,6 +765,9 @@ def add_package(
753
765
file_name = PackageFileName (file_name ),
754
766
checksum = checksum ,
755
767
license_concluded = PackageLicenseConcluded (license_concluded ),
768
+ license_comments = PackageLicenseComments (license_comments )
769
+ if license_comments is not None
770
+ else None ,
756
771
license_declared = PackageLicenseDeclared (license_declared )
757
772
if license_declared is not None
758
773
else None ,
0 commit comments