Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
misl6 merged 1 commit intokivy:developfrom
misl6:do-not-copy-and-compile-blacklisted
Nov 4, 2022
Merged

Fixes an issue regarding blacklist and bytecode compile + some cleanup#2693
misl6 merged 1 commit intokivy:developfrom
misl6:do-not-copy-and-compile-blacklisted

Conversation

Copy link
Member

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.

AndreMiras approved these changes Oct 24, 2022
Copy link
Member

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 merged commit 53d77fc into kivy:develop Nov 4, 2022
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

Reviewers

AndreMiras AndreMiras approved these changes

Assignees

No one assigned

Labels

None yet

Projects

Status: Done

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants