OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """Utility for checking and processing licensing information in third_party | 6 """Utility for checking and processing licensing information in third_party |
7 directories. | 7 directories. |
8 | 8 |
9 Usage: licenses.py <command> | 9 Usage: licenses.py <command> |
10 | 10 |
11 Commands: | 11 Commands: |
12 scan scan third_party directories, verifying that we have licensing info | 12 scan scan third_party directories, verifying that we have licensing info |
13 credits generate about:credits on stdout | 13 credits generate about:credits on stdout |
14 | 14 |
15 (You can also import this as a module.) | 15 (You can also import this as a module.) |
16 """ | 16 """ |
17 | 17 |
18 import cgi | 18 import cgi |
19 import os | 19 import os |
20 import sys | 20 import sys |
21 | 21 |
22 # Paths from the root of the tree to directories to skip. | 22 # Paths from the root of the tree to directories to skip. |
23 PRUNE_PATHS = set([ | 23 PRUNE_PATHS = set([ |
24 # Same module occurs in both the top-level third_party and others. | 24 # Same module occurs in both the top-level third_party and others. |
25 os.path.join('base','third_party','icu'), | 25 os.path.join('base','third_party','icu'), |
26 | 26 |
27 # Assume for now that breakpad has their licensing in order. | 27 # Assume for now that breakpad has their licensing in order. |
28 os.path.join('breakpad'), | 28 os.path.join('breakpad'), |
29 | 29 |
30 # This is just a tiny vsprops file, presumably written by the google-url | |
31 # authors. Not third-party code. | |
32 os.path.join('googleurl','third_party','icu'), | |
33 | |
34 # Assume for now that native client has their licensing in order. | 30 # Assume for now that native client has their licensing in order. |
35 os.path.join('native_client'), | 31 os.path.join('native_client'), |
36 | 32 |
37 # Same module occurs in chrome/ and in net/, so skip one of them. | 33 # Same module occurs in chrome/ and in net/, so skip one of them. |
38 os.path.join('net','third_party','mozilla_security_manager'), | 34 os.path.join('net','third_party','mozilla_security_manager'), |
39 | 35 |
40 # Same module occurs in base/, net/, and src/ so skip all but one of them. | 36 # Same module occurs in base/, net/, and src/ so skip all but one of them. |
41 os.path.join('third_party','nss'), | 37 os.path.join('third_party','nss'), |
42 os.path.join('net','third_party','nss'), | 38 os.path.join('net','third_party','nss'), |
43 | 39 |
44 # We don't bundle o3d samples into our resulting binaries. | 40 # Placeholder directory only, not third-party code. |
45 os.path.join('o3d','samples'), | |
46 | |
47 # Not in the public Chromium tree. | |
48 os.path.join('third_party','adobe'), | 41 os.path.join('third_party','adobe'), |
49 | 42 |
50 # Same license as Chromium. | 43 # Same license as Chromium. |
51 os.path.join('third_party','lss'), | 44 os.path.join('third_party','lss'), |
52 | 45 |
53 # Only binaries, used during development. | 46 # Only binaries, used during development. |
54 os.path.join('third_party','valgrind'), | 47 os.path.join('third_party','valgrind'), |
55 | 48 |
56 # Two directories that are the same as those in base/third_party. | 49 # Directories that are the same as those in base/third_party. |
57 os.path.join('v8','src','third_party','dtoa'), | |
58 os.path.join('v8','src','third_party','valgrind'), | 50 os.path.join('v8','src','third_party','valgrind'), |
59 | 51 |
60 # Used for development and test, not in the shipping product. | 52 # Used for development and test, not in the shipping product. |
61 os.path.join('third_party','android_testrunner'), | |
62 os.path.join('third_party','bidichecker'), | 53 os.path.join('third_party','bidichecker'), |
63 os.path.join('third_party','cygwin'), | 54 os.path.join('third_party','cygwin'), |
64 os.path.join('third_party','gold'), | 55 os.path.join('third_party','gold'), |
65 os.path.join('third_party','lighttpd'), | 56 os.path.join('third_party','lighttpd'), |
66 os.path.join('third_party','mingw-w64'), | 57 os.path.join('third_party','mingw-w64'), |
67 os.path.join('third_party','pefile'), | 58 os.path.join('third_party','pefile'), |
68 os.path.join('third_party','python_26'), | 59 os.path.join('third_party','python_26'), |
69 | 60 |
70 # Stuff pulled in from chrome-internal for official builds/tools. | 61 # Stuff pulled in from chrome-internal for official builds/tools. |
71 os.path.join('third_party', 'clear_cache'), | 62 os.path.join('third_party', 'clear_cache'), |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 elif command == 'credits': | 379 elif command == 'credits': |
389 if not GenerateCredits(): | 380 if not GenerateCredits(): |
390 return 1 | 381 return 1 |
391 else: | 382 else: |
392 print __doc__ | 383 print __doc__ |
393 return 1 | 384 return 1 |
394 | 385 |
395 | 386 |
396 if __name__ == '__main__': | 387 if __name__ == '__main__': |
397 sys.exit(main()) | 388 sys.exit(main()) |
OLD | NEW |