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 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 VCS_METADATA_DIRS = ('.svn', '.git') | 74 VCS_METADATA_DIRS = ('.svn', '.git') |
75 PRUNE_DIRS = (VCS_METADATA_DIRS + | 75 PRUNE_DIRS = (VCS_METADATA_DIRS + |
76 ('out', 'Debug', 'Release', # build files | 76 ('out', 'Debug', 'Release', # build files |
77 'layout_tests')) # lots of subdirs | 77 'layout_tests')) # lots of subdirs |
78 | 78 |
79 ADDITIONAL_PATHS = ( | 79 ADDITIONAL_PATHS = ( |
80 os.path.join('breakpad'), | 80 os.path.join('breakpad'), |
81 os.path.join('chrome', 'common', 'extensions', 'docs', 'examples'), | 81 os.path.join('chrome', 'common', 'extensions', 'docs', 'examples'), |
82 os.path.join('chrome', 'test', 'chromeos', 'autotest'), | 82 os.path.join('chrome', 'test', 'chromeos', 'autotest'), |
83 os.path.join('chrome', 'test', 'data'), | 83 os.path.join('chrome', 'test', 'data'), |
84 os.path.join('googleurl'), | |
85 os.path.join('native_client'), | 84 os.path.join('native_client'), |
86 os.path.join('native_client_sdk'), | 85 os.path.join('native_client_sdk'), |
87 os.path.join('net', 'tools', 'spdyshark'), | 86 os.path.join('net', 'tools', 'spdyshark'), |
88 os.path.join('ppapi'), | 87 os.path.join('ppapi'), |
89 os.path.join('sandbox', 'linux', 'seccomp-legacy'), | 88 os.path.join('sandbox', 'linux', 'seccomp-legacy'), |
90 os.path.join('sdch', 'open-vcdiff'), | 89 os.path.join('sdch', 'open-vcdiff'), |
91 os.path.join('testing', 'gmock'), | 90 os.path.join('testing', 'gmock'), |
92 os.path.join('testing', 'gtest'), | 91 os.path.join('testing', 'gtest'), |
93 # The directory with the word list for Chinese and Japanese segmentation | 92 # The directory with the word list for Chinese and Japanese segmentation |
94 # with different license terms than ICU. | 93 # with different license terms than ICU. |
95 os.path.join('third_party','icu','source','data','brkitr'), | 94 os.path.join('third_party','icu','source','data','brkitr'), |
96 os.path.join('tools', 'grit'), | 95 os.path.join('tools', 'grit'), |
97 os.path.join('tools', 'gyp'), | 96 os.path.join('tools', 'gyp'), |
98 os.path.join('tools', 'page_cycler', 'acid3'), | 97 os.path.join('tools', 'page_cycler', 'acid3'), |
99 os.path.join('v8'), | 98 os.path.join('v8'), |
100 # Fake directory so we can include the strongtalk license. | 99 # Fake directory so we can include the strongtalk license. |
101 os.path.join('v8', 'strongtalk'), | 100 os.path.join('v8', 'strongtalk'), |
102 ) | 101 ) |
103 | 102 |
104 | 103 |
105 # Directories where we check out directly from upstream, and therefore | 104 # Directories where we check out directly from upstream, and therefore |
106 # can't provide a README.chromium. Please prefer a README.chromium | 105 # can't provide a README.chromium. Please prefer a README.chromium |
107 # wherever possible. | 106 # wherever possible. |
108 SPECIAL_CASES = { | 107 SPECIAL_CASES = { |
109 os.path.join('googleurl'): { | |
110 "Name": "google-url", | |
111 "URL": "http://code.google.com/p/google-url/", | |
112 "License": "BSD and MPL 1.1/GPL 2.0/LGPL 2.1", | |
113 "License File": "LICENSE.txt", | |
114 }, | |
115 os.path.join('native_client'): { | 108 os.path.join('native_client'): { |
116 "Name": "native client", | 109 "Name": "native client", |
117 "URL": "http://code.google.com/p/nativeclient", | 110 "URL": "http://code.google.com/p/nativeclient", |
118 "License": "BSD", | 111 "License": "BSD", |
119 }, | 112 }, |
120 os.path.join('sandbox', 'linux', 'seccomp-legacy'): { | 113 os.path.join('sandbox', 'linux', 'seccomp-legacy'): { |
121 "Name": "seccompsandbox", | 114 "Name": "seccompsandbox", |
122 "URL": "http://code.google.com/p/seccompsandbox", | 115 "URL": "http://code.google.com/p/seccompsandbox", |
123 "License": "BSD", | 116 "License": "BSD", |
124 }, | 117 }, |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 elif command == 'credits': | 466 elif command == 'credits': |
474 if not GenerateCredits(): | 467 if not GenerateCredits(): |
475 return 1 | 468 return 1 |
476 else: | 469 else: |
477 print __doc__ | 470 print __doc__ |
478 return 1 | 471 return 1 |
479 | 472 |
480 | 473 |
481 if __name__ == '__main__': | 474 if __name__ == '__main__': |
482 sys.exit(main()) | 475 sys.exit(main()) |
OLD | NEW |