Skip to content

Commit 5f7c451

Browse files
sorru94nashif
authored andcommitted
west: spdx: Fix copyright parsing in REUSE 0.6.x
Fix broken copyright parsing. Since REUSE 6.0.0 the copyright_lines attribute has been removed. The new attribute copyright_notices is used. Additionally, the python package REUSE should now be at least v0.6.0. This will require an update of REUSE for users that were using a version earlier than 0.6. Fixes #98378 Signed-off-by: Simone Orru <[email protected]>
1 parent bf16aea commit 5f7c451

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

scripts/requirements-base.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pyserial
2424
requests>=2.32.4
2525
semver
2626
tqdm>=4.67.1
27-
reuse
27+
reuse>=6.0.0
2828

2929
# for ram/rom reports
3030
anytree

scripts/west_commands/zspdx/scanner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ def getCopyrightInfo(filePath):
194194
copyrights = []
195195

196196
for info in infos:
197-
if info.copyright_lines:
198-
copyrights.extend(info.copyright_lines)
197+
for notice in info.copyright_notices:
198+
copyrights.extend([notice.original])
199199

200200
return copyrights
201201
except Exception as e:

0 commit comments

Comments
 (0)