-
Notifications
You must be signed in to change notification settings - Fork 37
Description
When doing a flet build for macos or ipa, the serious_python deletes the metadata required by python packages to run properly.
The metadata is in the package's site-packages/.dist-info directory. Many python packages are build requiring their metadata around for access to install time variables, such as version. This leads to errors just doing an import.
I have documented the failures here:
flet-dev/flet#5440
the following code is what is causing the problem:
https://github.com/flet-dev/serious-python/blob/main/src/serious_python/bin/package_command.dart#L74
the .dist-info directory is considered to be "junk" when it's absolutely not.
If I copy the package's .dist-info directory from my .venv/lib/python-X/site-packages into the built package's site-package directory the apps work as they have their proper metadata required to work.