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'), | |
Nico
2012/08/04 21:40:15
Sounds like a bug that this doesn't cause license
Steve Block
2012/08/06 11:14:28
We don't need this as we now check src/googleurl a
| |
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'), | |
Nico
2012/08/04 21:40:15
This one's ok, we removed o3d a while ago.
| |
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 # Written as part of Chromium. | 43 # Written as part of Chromium. |
51 os.path.join('third_party','fuzzymatch'), | 44 os.path.join('third_party','fuzzymatch'), |
52 | 45 |
53 # Same license as Chromium. | 46 # Same license as Chromium. |
54 os.path.join('third_party','lss'), | 47 os.path.join('third_party','lss'), |
55 | 48 |
56 # Only binaries, used during development. | 49 # Directories that are the same as those in base/third_party. |
57 os.path.join('third_party','valgrind'), | |
Nico
2012/08/04 21:40:15
This is checked out only on the valgrind bots, so
Steve Block
2012/08/06 11:14:28
Ah, I see. Where is that specified? I didn't see a
Nico
2012/08/06 23:54:24
http://www.chromium.org/developers/how-tos/using-v
| |
58 | |
59 # Two directories that are the same as those in base/third_party. | |
60 os.path.join('v8','src','third_party','dtoa'), | |
61 os.path.join('v8','src','third_party','valgrind'), | 50 os.path.join('v8','src','third_party','valgrind'), |
62 | 51 |
63 # Used for development and test, not in the shipping product. | 52 # Used for development and test, not in the shipping product. |
64 os.path.join('third_party','android_testrunner'), | |
Nico
2012/08/04 21:40:15
This is probably checked out on the android bots,
Steve Block
2012/08/06 11:14:28
Yes, it is, but the metadata is all good.
| |
65 os.path.join('third_party','bidichecker'), | 53 os.path.join('third_party','bidichecker'), |
66 os.path.join('third_party','cygwin'), | 54 os.path.join('third_party','cygwin'), |
67 os.path.join('third_party','gold'), | 55 os.path.join('third_party','gold'), |
68 os.path.join('third_party','lighttpd'), | 56 os.path.join('third_party','lighttpd'), |
69 os.path.join('third_party','mingw-w64'), | 57 os.path.join('third_party','mingw-w64'), |
70 os.path.join('third_party','pefile'), | 58 os.path.join('third_party','pefile'), |
71 os.path.join('third_party','python_26'), | 59 os.path.join('third_party','python_26'), |
72 | 60 |
73 # Stuff pulled in from chrome-internal for official builds/tools. | 61 # Stuff pulled in from chrome-internal for official builds/tools. |
74 os.path.join('third_party', 'clear_cache'), | 62 os.path.join('third_party', 'clear_cache'), |
75 os.path.join('third_party', 'gnu'), | 63 os.path.join('third_party', 'gnu'), |
76 os.path.join('third_party', 'googlemac'), | 64 os.path.join('third_party', 'googlemac'), |
77 os.path.join('third_party', 'pcre'), | 65 os.path.join('third_party', 'pcre'), |
78 os.path.join('third_party', 'psutils'), | 66 os.path.join('third_party', 'psutils'), |
79 os.path.join('third_party', 'sawbuck'), | 67 os.path.join('third_party', 'sawbuck'), |
80 | 68 |
81 # Redistribution does not require attribution in documentation. | |
82 os.path.join('third_party','directxsdk'), | |
83 os.path.join('third_party','platformsdk_win2008_6_1'), | |
84 os.path.join('third_party','platformsdk_win7'), | |
Nico
2012/08/04 21:40:15
This is checked out for people who map src-interna
Steve Block
2012/08/06 11:14:28
OK
| |
85 | |
86 # Harfbuzz-ng is not currently shipping in any product: | 69 # Harfbuzz-ng is not currently shipping in any product: |
87 os.path.join('third_party','harfbuzz-ng'), | 70 os.path.join('third_party','harfbuzz-ng'), |
88 ]) | 71 ]) |
89 | 72 |
90 # Directories we don't scan through. | 73 # Directories we don't scan through. |
91 PRUNE_DIRS = ('.svn', '.git', # VCS metadata | 74 PRUNE_DIRS = ('.svn', '.git', # VCS metadata |
92 'out', 'Debug', 'Release', # build files | 75 'out', 'Debug', 'Release', # build files |
93 'layout_tests') # lots of subdirs | 76 'layout_tests') # lots of subdirs |
94 | 77 |
95 ADDITIONAL_PATHS = ( | 78 ADDITIONAL_PATHS = ( |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
391 elif command == 'credits': | 374 elif command == 'credits': |
392 if not GenerateCredits(): | 375 if not GenerateCredits(): |
393 return 1 | 376 return 1 |
394 else: | 377 else: |
395 print __doc__ | 378 print __doc__ |
396 return 1 | 379 return 1 |
397 | 380 |
398 | 381 |
399 if __name__ == '__main__': | 382 if __name__ == '__main__': |
400 sys.exit(main()) | 383 sys.exit(main()) |
OLD | NEW |