Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes an issue regarding blacklist and bytecode compile + some cleanup #2693

Merged
merged 1 commit into from
Nov 4, 2022

Conversation

misl6
Copy link
Member

@misl6 misl6 commented Oct 23, 2022

When building an app via python-for-android (without using buildozer on top of it), the app may fail to build.

python-for-android refuses to build due to a python file that is located in a blacklisted folder (via blacklist.txt) as that file is failing the byte-compile step.

That should not happen, as a blacklisted folder (E.g. venv or .git) may contain a python file that can't be byte-compiled.
Also, byte-compiling a blacklisted folder may lead to an increase of the build time.

This PR targets the above-mentioned issue, and the following minor ones:

  • As of Python 3.5, the .pyo filename extension is no longer used and has been removed in favour of extension .pyc
    All the references to pyo has been removed. --no-compile-pyo build option has been removed in favor of --no-byte-compile-python, which doesn't refer to a specific filename extension.
  • .apk and .aab are not blacklisted by default. The first ever build will work, but the subsequent one will try to also include the .apk or .aab into the artifact. That will lead to an increase in size and a potential failure during the final gradle step.

Copy link
Member

@AndreMiras AndreMiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch and good clean up thanks!

@misl6 misl6 merged commit 53d77fc into kivy:develop Nov 4, 2022
@misl6 misl6 deleted the do-not-copy-and-compile-blacklisted branch November 4, 2022 17:21
shyamnathp pushed a commit to shyamnathp/python-for-android that referenced this pull request Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants