File tree 2 files changed +14
-4
lines changed
pythonforandroid/bootstraps
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):
248
248
249
249
default_icon = 'templates/kivy-icon.png'
250
250
shutil .copy (args .icon or default_icon , 'res/drawable/icon.png' )
251
-
251
+
252
252
versioned_name = (args .name .replace (' ' , '' ).replace ('\' ' , '' ) +
253
253
'-' + args .version )
254
254
@@ -285,7 +285,7 @@ def make_package(args):
285
285
fileh .write (re .sub (r'"private_version">[0-9\.]*<' ,
286
286
'"private_version">{}<' .format (
287
287
str (time .time ())), lines ))
288
-
288
+
289
289
290
290
def parse_args (args = None ):
291
291
import argparse
@@ -322,12 +322,17 @@ def parse_args(args=None):
322
322
'"sensor"' ))
323
323
ap .add_argument ('--icon' , dest = 'icon' ,
324
324
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.' )
325
327
326
328
if args is None :
327
329
args = sys .argv [1 :]
328
330
args = ap .parse_args (args )
329
331
args .ignore_path = []
330
332
333
+ if args .permissions is None :
334
+ args .permissions = []
335
+
331
336
make_package (args )
332
337
333
338
if __name__ == "__main__" :
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ def make_package(args):
248
248
249
249
default_icon = 'templates/kivy-icon.png'
250
250
shutil .copy (args .icon or default_icon , 'res/drawable/icon.png' )
251
-
251
+
252
252
versioned_name = (args .name .replace (' ' , '' ).replace ('\' ' , '' ) +
253
253
'-' + args .version )
254
254
@@ -285,7 +285,7 @@ def make_package(args):
285
285
fileh .write (re .sub (r'"private_version">[0-9\.]*<' ,
286
286
'"private_version">{}<' .format (
287
287
str (time .time ())), lines ))
288
-
288
+
289
289
290
290
def parse_args (args = None ):
291
291
import argparse
@@ -322,12 +322,17 @@ def parse_args(args=None):
322
322
'"sensor"' ))
323
323
ap .add_argument ('--icon' , dest = 'icon' ,
324
324
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.' )
325
327
326
328
if args is None :
327
329
args = sys .argv [1 :]
328
330
args = ap .parse_args (args )
329
331
args .ignore_path = []
330
332
333
+ if args .permissions is None :
334
+ args .permissions = []
335
+
331
336
make_package (args )
332
337
333
338
if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments