Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Side by Side Diff: android_webview/tools/webview_licenses.py

Issue 12886004: Android WebView: sort directories in license tool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/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 """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
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 The contents of the NOTICE file. 233 The contents of the NOTICE file.
234 """ 234 """
235 235
236 third_party_dirs = _FindThirdPartyDirs() 236 third_party_dirs = _FindThirdPartyDirs()
237 237
238 # Don't forget Chromium's LICENSE file 238 # Don't forget Chromium's LICENSE file
239 content = [_ReadFile('LICENSE')] 239 content = [_ReadFile('LICENSE')]
240 240
241 # We provide attribution for all third-party directories. 241 # We provide attribution for all third-party directories.
242 # TODO(steveblock): Limit this to only code used by the WebView binary. 242 # TODO(steveblock): Limit this to only code used by the WebView binary.
243 for directory in third_party_dirs: 243 for directory in sorted(third_party_dirs):
244 metadata = licenses.ParseDir(directory, REPOSITORY_ROOT, 244 metadata = licenses.ParseDir(directory, REPOSITORY_ROOT,
245 require_license_file=False) 245 require_license_file=False)
246 license_file = metadata['License File'] 246 license_file = metadata['License File']
247 if license_file and license_file != licenses.NOT_SHIPPED: 247 if license_file and license_file != licenses.NOT_SHIPPED:
248 content.append(_ReadFile(license_file)) 248 content.append(_ReadFile(license_file))
249 249
250 return '\n'.join(content) 250 return '\n'.join(content)
251 251
252 252
253 def main(): 253 def main():
(...skipping 21 matching lines...) Expand all
275 return scan_result 275 return scan_result
276 elif args[0] == 'notice': 276 elif args[0] == 'notice':
277 print GenerateNoticeFile() 277 print GenerateNoticeFile()
278 return ScanResult.Ok 278 return ScanResult.Ok
279 279
280 parser.print_help() 280 parser.print_help()
281 return ScanResult.Errors 281 return ScanResult.Errors
282 282
283 if __name__ == '__main__': 283 if __name__ == '__main__':
284 sys.exit(main()) 284 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698