Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pythonforandroid/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,18 @@ def _get_option_tuples(self, option_string):
class ToolchainCL(object):

def __init__(self):

argv = sys.argv
# Buildozer used to pass these arguments in a now-invalid order
# If that happens, apply this fix
# This fix will be removed once a fixed buildozer is released
if (len(argv) > 2 and
argv[1].startswith('--color') and
argv[2].startswith('--storage-dir') and
argv[3] == 'apk'):
argv.append(argv.pop(1)) # the --color arg
argv.append(argv.pop(1)) # the --storage-dir arg

parser = NoAbbrevParser(
description=('A packaging tool for turning Python scripts and apps '
'into Android APKs'))
Expand Down