Skip to content

Commit e366423

Browse files
authored
Merge pull request #824 from inclement/buildozer_temporary_fix
Added temporary fix for buildozer 0.32
2 parents a59d99e + ba6cf1a commit e366423

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pythonforandroid/toolchain.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,18 @@ def _get_option_tuples(self, option_string):
210210
class ToolchainCL(object):
211211

212212
def __init__(self):
213+
214+
argv = sys.argv
215+
# Buildozer used to pass these arguments in a now-invalid order
216+
# If that happens, apply this fix
217+
# This fix will be removed once a fixed buildozer is released
218+
if (len(argv) > 2 and
219+
argv[1].startswith('--color') and
220+
argv[2].startswith('--storage-dir') and
221+
argv[3] == 'apk'):
222+
argv.append(argv.pop(1)) # the --color arg
223+
argv.append(argv.pop(1)) # the --storage-dir arg
224+
213225
parser = NoAbbrevParser(
214226
description=('A packaging tool for turning Python scripts and apps '
215227
'into Android APKs'))

0 commit comments

Comments
 (0)