Skip to content

Commit

Permalink
Add option to disabling of byte-code compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
Zen-CODE committed May 10, 2021
1 parent 0a8e401 commit b7e3122
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions buildozer/default.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down
5 changes: 5 additions & 0 deletions buildozer/targets/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,11 @@ def execute_build_package(self, build_cmd):
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)

Expand Down

0 comments on commit b7e3122

Please sign in to comment.