8000 Allow list of permissions for bdist · Rootex/python-for-android@6f1945c · GitHub
[go: up one dir, main page]

Skip to content

Commit 6f1945c

Browse files
committed
Allow list of permissions for bdist
1 parent aacc461 commit 6f1945c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pythonforandroid/bdistapk.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ def finalize_options(self):
4242
if source == 'command line':
4343
continue
4444
if not argv_contains('--' + option):
45-
if value in (None, 'None'):
45+
# allow 'permissions': ['permission', 'permission] in apk
46+
if option == 'permissions':
47+
for perm in value:
48+
sys.argv.append('--permission={}'.format(perm))
49+
elif value in (None, 'None'):
4650
sys.argv.append('--{}'.format(option))
4751
else:
4852
sys.argv.append('--{}={}'.format(option, value))
@@ -138,4 +142,4 @@ def _set_user_options():
138142

139143
BdistAPK.user_options = user_options
140144

141-
_set_user_options()
145+
_set_user_options()

0 commit comments

Comments
 (0)
0