From 7cffb89bf5597d366cd7b6b531e07dd9c1a5e222 Mon Sep 17 00:00:00 2001 From: Antonio Cuni Date: Wed, 13 Oct 2021 20:34:30 +0200 Subject: [PATCH] add the option p4a.extra_args, to allow passing arbitrary extra objects to p4a (#1369) --- buildozer/default.spec | 3 +++ buildozer/targets/android.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/buildozer/default.spec b/buildozer/default.spec index c03cf6419..c48488c75 100644 --- a/buildozer/default.spec +++ b/buildozer/default.spec @@ -313,6 +313,9 @@ android.allow_backup = True # setup.py if you're using Poetry, but you need to add "toml" to source.include_exts. #p4a.setup_py = false +# (str) extra command line arguments to pass when invoking pythonforandroid.toolchain +#p4a.extra_args = + # # iOS specific diff --git a/buildozer/targets/android.py b/buildozer/targets/android.py index 481307aa4..b4373e704 100644 --- a/buildozer/targets/android.py +++ b/buildozer/targets/android.py @@ -108,6 +108,11 @@ def __init__(self, *args, **kwargs): if self.buildozer.log_level >= 2: self.extra_p4a_args += ' --debug' + user_extra_p4a_args = self.buildozer.config.getdefault('app', 'p4a.extra_args', + None) + if user_extra_p4a_args: + self.extra_p4a_args += ' ' + user_extra_p4a_args + self.warn_on_deprecated_tokens() def warn_on_deprecated_tokens(self):