| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """Checks third-party licenses for the purposes of the Android WebView build. | 6 """Checks third-party licenses for the purposes of the Android WebView build. |
| 7 | 7 |
| 8 The Android tree includes a snapshot of Chromium in order to power the system | 8 The Android tree includes a snapshot of Chromium in order to power the system |
| 9 WebView. This tool checks that all code uses open-source licenses compatible | 9 WebView. This tool checks that all code uses open-source licenses compatible |
| 10 with Android, and that we meet the requirements of those licenses. It can also | 10 with Android, and that we meet the requirements of those licenses. It can also |
| 11 be used to generate an Android NOTICE file for the third-party code. | 11 be used to generate an Android NOTICE file for the third-party code. |
| 12 | 12 |
| 13 It makes use of src/tools/licenses.py and the README.chromium files on which | 13 It makes use of src/tools/licenses.py and the README.chromium files on which |
| 14 it depends. It also makes use of a data file, third_party_files_whitelist.txt, | 14 it depends. It also makes use of a data file, third_party_files_whitelist.txt, |
| 15 which whitelists indicidual files which contain third-party code but which | 15 which whitelists individual files which contain third-party code but which |
| 16 aren't in a third-party directory with a README.chromium file. | 16 aren't in a third-party directory with a README.chromium file. |
| 17 """ | 17 """ |
| 18 | 18 |
| 19 import imp | 19 import imp |
| 20 import json | 20 import json |
| 21 import multiprocessing | 21 import multiprocessing |
| 22 import optparse | 22 import optparse |
| 23 import os | 23 import os |
| 24 import re | 24 import re |
| 25 import sys | 25 import sys |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 files = sys.stdin.read().splitlines() | 293 files = sys.stdin.read().splitlines() |
| 294 for f, c in \ | 294 for f, c in \ |
| 295 zip(files, copyright_scanner.FindCopyrights(InputApi(), '.', files)): | 295 zip(files, copyright_scanner.FindCopyrights(InputApi(), '.', files)): |
| 296 print f, '\t', ' / '.join(sorted(c)) | 296 print f, '\t', ' / '.join(sorted(c)) |
| 297 return ScanResult.Ok | 297 return ScanResult.Ok |
| 298 parser.print_help() | 298 parser.print_help() |
| 299 return ScanResult.Errors | 299 return ScanResult.Errors |
| 300 | 300 |
| 301 if __name__ == '__main__': | 301 if __name__ == '__main__': |
| 302 sys.exit(main()) | 302 sys.exit(main()) |
| OLD | NEW |