kivy / kivy/kivy-github-discussions
Tree-Shake python dependencies
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
### Discussed in https://github.com/orgs/kivy/discussions/22
Originally posted by **baseplate-admin** January 5, 2024
As it stands,
The apk generated by `python-for-android` are large in size and nature.
I was wondering if it was possible to tree shake the android venv to reduce size.
Possible paths :
* **Compile python with bare minimum**: This means we remove the `stdlib` to a bare minimum for our app to function.
* **Remove codes from venv** : Tools like [`dead`](https://github.com/asottile/dead) and [`vulture`](https://github.com/jendrikseipp/vulture) can be of use here.
* **Use better compression algorithm** : Maybe support `brotli`/`zstd` instead of `.zip` ( or maybe even `7-zip` )
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked discussion at https://github.com/orgs/kivy/discussions/22 and review how python-for-android builds the APK and its Python environment. Compare the proposed approaches—minimal Python stdlib, removing unused virtual-environment code, and alternative compression—and define a concrete scope and validation target, since the issue names no files, tests, or completion criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, python
- Domain
- build-system, mobile
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100