Skip to content

Commit c2269f3

Browse files
Fix license list version value in spdx tv output #3257
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
1 parent fca7b72 commit c2269f3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/formattedcode/output_spdx.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ def write_spdx(
245245
ns_prefix = '_'.join(package_name.lower().split())
246246
comment = notice + f'\nSPDX License List: {scancode_config.spdx_license_list_version}'
247247

248+
version_major, version_minor = tuple(scancode_config.spdx_license_list_version.split("."))
249+
spdx_license_list_version = Version(major=version_major, minor=version_minor)
250+
248251
doc = Document(
249252
version=Version(*spdx_version),
250253
data_license=License.from_identifier('CC0-1.0'),
@@ -257,6 +260,7 @@ def write_spdx(
257260
tool_name = tool_name or 'ScanCode'
258261
doc.creation_info.add_creator(Tool(f'{tool_name} {tool_version}'))
259262
doc.creation_info.set_created_now()
263+
doc.creation_info.license_list_version = spdx_license_list_version
260264

261265
package_id = '001'
262266
package = doc.package = Package(

0 commit comments

Comments
 (0)