flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
10.34k stars 399 forks source link

Problems with building APK app that depends on lxml #2453

Open gryznar opened 6 months ago

gryznar commented 6 months ago

Description

Building Android app, that depends on lxml may lead to few problems:

  1. Packaging tool is not using .whl available on PyPI, trying to build from .tar.gz instead (as opposite to flet build windows which uses .whl)
  2. Crash hangs the process forever

Code example to reproduce the issue:

flet build apk

Describe the results you received:

VERBOSE: Building wheel for lxml (pyproject.toml): finished with status 'error'
^CTerminate batch job (Y/N)? 

Describe the results you expected:

  1. Installation manager should prefer .whl than source distribution
  2. Error should propagate and not hang the program

Flet version:

0.19.0

Operating system:

Windows

FeodorFitsner commented 6 months ago

lxml is the native package, please follow this guide (until the process is completely automated): https://flet.dev/docs/guides/python/packaging-app-for-distribution#native-python-packages