File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
pythonforandroid/bootstraps Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ def make_package(args):
248248
249249 default_icon = 'templates/kivy-icon.png'
250250 shutil .copy (args .icon or default_icon , 'res/drawable/icon.png' )
251-
251+
252252 versioned_name = (args .name .replace (' ' , '' ).replace ('\' ' , '' ) +
253253 '-' + args .version )
254254
@@ -285,7 +285,7 @@ def make_package(args):
285285 fileh .write (re .sub (r'"private_version">[0-9\.]*<' ,
286286 '"private_version">{}<' .format (
287287 str (time .time ())), lines ))
288-
288+
289289
290290def parse_args (args = None ):
291291 import argparse
@@ -322,12 +322,17 @@ def parse_args(args=None):
322322 '"sensor"' ))
323323 ap .add_argument ('--icon' , dest = 'icon' ,
324324 help = 'A png file to use as the icon for the application.' )
325+ ap .add_argument ('--permission' , dest = 'permissions' , action = 'append' ,
326+ help = 'The permissions to give this app.' )
325327
326328 if args is None :
327329 args = sys .argv [1 :]
328330 args = ap .parse_args (args )
329331 args .ignore_path = []
330332
333+ if args .permissions is None :
334+ args .permissions = []
335+
331336 make_package (args )
332337
333338if __name__ == "__main__" :
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ def make_package(args):
248248
249249 default_icon = 'templates/kivy-icon.png'
250250 shutil .copy (args .icon or default_icon , 'res/drawable/icon.png' )
251-
251+
252252 versioned_name = (args .name .replace (' ' , '' ).replace ('\' ' , '' ) +
253253 '-' + args .version )
254254
@@ -285,7 +285,7 @@ def make_package(args):
285285 fileh .write (re .sub (r'"private_version">[0-9\.]*<' ,
286286 '"private_version">{}<' .format (
287287 str (time .time ())), lines ))
288-
288+
289289
290290def parse_args (args = None ):
291291 import argparse
@@ -322,12 +322,17 @@ def parse_args(args=None):
322322 '"sensor"' ))
323323 ap .add_argument ('--icon' , dest = 'icon' ,
324324 help = 'A png file to use as the icon for the application.' )
325+ ap .add_argument ('--permission' , dest = 'permissions' , action = 'append' ,
326+ help = 'The permissions to give this app.' )
325327
326328 if args is None :
327329 args = sys .argv [1 :]
328330 args = ap .parse_args (args )
329331 args .ignore_path = []
330332
333+ if args .permissions is None :
334+ args .permissions = []
335+
331336 make_package (args )
332337
333338if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments