Add option to disabling of byte-code compilation

This commit is contained in:
Richard Larkin 2021-05-10 20:05:15 +02:00
parent 0a8e401877
commit b7e312255d
2 changed files with 8 additions and 0 deletions

View file

@ -256,6 +256,9 @@ android.allow_backup = True
# Usage example : android.manifest_placeholders = [myCustomUrl:\"org.kivy.customurl\"]
# android.manifest_placeholders = [:]
# (bool) disables the compilation of py to pyc/pyo files when packaging
# android.no-compile-pyo = True
#
# Python for android (p4a) specific
#

View file

@ -902,6 +902,11 @@ class TargetAndroid(Target):
cmd.append('--manifest-placeholders')
cmd.append("{}".format(manifest_placeholders))
# support disabling of compilation
compile_py = self.buildozer.config.getdefault('app', 'android.no-compile-pyo', None)
if compile_py:
cmd.append('--no-compile-pyo')
cmd.append('--arch')
cmd.append(self._arch)