@@ -597,14 +597,16 @@ def parse_args(args=None):
597597 ap .add_argument ('--launcher' , dest = 'launcher' , action = 'store_true' ,
598598 help = ('Provide this argument to build a multi-app '
599599 'launcher, rather than a single app.' ))
600- ap .add_argument ('--permission' , dest = 'permissions' , action = 'append' ,
600+ ap .add_argument ('--permission' , dest = 'permissions' , action = 'append' , default = [],
601601 help = 'The permissions to give this app.' , nargs = '+' )
602- ap .add_argument ('--meta-data' , dest = 'meta_data' , action = 'append' ,
602+ ap .add_argument ('--meta-data' , dest = 'meta_data' , action = 'append' , default = [],
603603 help = 'Custom key=value to add in application metadata' )
604+ ap .add_argument ('--uses-library' , dest = 'android_used_libs' , action = 'append' , default = [],
605+ help = 'Used shared libraries included using <uses-library> tag in AndroidManifest.xml' )
604606 ap .add_argument ('--icon' , dest = 'icon' ,
605607 help = ('A png file to use as the icon for '
606608 'the application.' ))
607- ap .add_argument ('--service' , dest = 'services' , action = 'append' ,
609+ ap .add_argument ('--service' , dest = 'services' , action = 'append' , default = [],
608610 help = 'Declare a new service entrypoint: '
609611 'NAME:PATH_TO_PY[:foreground]' )
610612 if get_bootstrap_name () != "service_only" :
@@ -747,17 +749,8 @@ def _read_configuration():
747749 'deprecated and does nothing.' )
748750 args .sdk_version = - 1 # ensure it is not used
749751
750- if args .permissions is None :
751- args .permissions = []
752- elif args .permissions :
753- if isinstance (args .permissions [0 ], list ):
754- args .permissions = [p for perm in args .permissions for p in perm ]
755-
756- if args .meta_data is None :
757- args .meta_data = []
758-
759- if args .services is None :
760- args .services = []
752+ if args .permissions and isinstance (args .permissions [0 ], list ):
753+ args .permissions = [p for perm in args .permissions for p in perm ]
761754
762755 if args .try_system_python_compile :
763756 # Hardcoding python2.7 is okay for now, as python3 skips the
0 commit comments