 Chromium Code Reviews
 Chromium Code Reviews Issue 14315010:
  Add fetch recipe alias targeting Android  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
    
  
    Issue 14315010:
  Add fetch recipe alias targeting Android  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master| Index: recipes/android.py | 
| diff --git a/recipes/android.py b/recipes/android.py | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..ccc1a44fcc89fe403a9c79a6b1de8d17ef69f939 | 
| --- /dev/null | 
| +++ b/recipes/android.py | 
| @@ -0,0 +1,28 @@ | 
| +# Copyright (c) 2013 The Chromium Authors. All rights reserved. | 
| +# Use of this source code is governed by a BSD-style license that can be | 
| +# found in the LICENSE file. | 
| + | 
| +# pylint: disable=F0401 | 
| +import recipe_util | 
| 
M-A Ruel
2013/04/24 13:09:14
stdlib import first
then local imports
 
janx
2013/04/26 10:05:09
Done.
 | 
| +import sys | 
| + | 
| 
M-A Ruel
2013/04/24 13:09:14
2 lines
 
janx
2013/04/26 10:05:09
Done.
 | 
| +# pylint: disable=W0232 | 
| 
M-A Ruel
2013/04/24 13:09:14
Can you add a single line comment with what this w
 
agable
2013/04/24 18:04:09
It's "class has no __init__ method", and it's my b
 
janx
2013/04/26 10:05:09
Done.
 | 
| +class Android(recipe_util.Recipe): | 
| + """Basic Recipe alias for Android -> Chromium.""" | 
| + | 
| + @staticmethod | 
| + def fetch_spec(props): | 
| + return { | 
| + 'alias': { | 
| + 'recipe': 'chromium', | 
| + 'props': ['--target_os=android'] | 
| 
M-A Ruel
2013/04/24 13:09:14
Append comma
 
janx
2013/04/26 10:05:09
Done.
 | 
| + } | 
| 
M-A Ruel
2013/04/24 13:09:14
Here too
 
janx
2013/04/26 10:05:09
Done.
 | 
| + } | 
| + | 
| + | 
| +def main(argv=None): | 
| + Android().handle_args(argv) | 
| 
M-A Ruel
2013/04/24 13:09:14
return ?
Aaron, does handle_args returns an int?
 
agable
2013/04/24 18:04:09
Yes, right this should be "return Android..."
 
janx
2013/04/26 10:05:09
Done.
 | 
| + | 
| + | 
| +if __name__ == '__main__': | 
| + sys.exit(main(sys.argv)) |