Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cuda_pathfinder/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.

Apache License
Version 2.0, January 2004
Expand Down
18 changes: 17 additions & 1 deletion toolshed/check_spdx.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@
}

SPDX_IGNORE_FILENAME = ".spdx-ignore"
REPOSITORY_LICENSE_CONTENTS = Path("LICENSE").read_bytes()


def license_files_match_repository(filepaths):
licenses_match = True
for filepath in filepaths:
license_path = Path(filepath)
if license_path.name != "LICENSE":
continue
if license_path.read_bytes() != REPOSITORY_LICENSE_CONTENTS:
print(f"PACKAGE LICENSE {filepath!r} does not match repository LICENSE")
licenses_match = False
return licenses_match


def load_spdx_ignore():
Expand Down Expand Up @@ -203,9 +216,12 @@ def main(args):
else:
fix = False

returncode = 0
if not license_files_match_repository(args):
returncode = 1

ignore_spec = load_spdx_ignore()

returncode = 0
for filepath in args:
if ignore_spec.match_file(filepath):
continue
Expand Down
Loading