-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UR] Dont run license checks at configure time
- Loading branch information
Petr Vesely
committed
Aug 1, 2023
1 parent
36fdd69
commit 154699b
Showing
7 changed files
with
74 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
""" | ||
Copyright (C) 2022 Intel Corporation | ||
Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions. | ||
See LICENSE.TXT | ||
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
""" | ||
Copyright (C) 2022 Intel Corporation | ||
Part of the Unified-Runtime Project, under the Apache License v2.0 with LLVM Exceptions. | ||
See LICENSE.TXT | ||
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
""" | ||
|
||
import sys | ||
import argparse | ||
|
||
def verify_file_has_license(file): | ||
with open(file, 'r') as in_file: | ||
input = in_file.read(300) | ||
if "SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception" not in input: | ||
raise Exception(f"{file} does not contain a license!") | ||
|
||
def main(): | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument('-f', '--files', nargs='+', default=[]) | ||
args = parser.parse_args() | ||
for file in args.files: | ||
verify_file_has_license(file) | ||
|
||
|
||
if __name__ == "__main__": | ||
sys.exit(main()) |