flet-dev / serious-python

Python runtime for Flutter apps
Apache License 2.0
186 stars 20 forks source link

Failing builds for custom dist on arm64 iOS simulator #103

Open chabad360 opened 1 month ago

chabad360 commented 1 month ago

When trying to run for iOS, it fails to build with the following error:

NY792:front_end user265210$ flutter run
Launching lib/main.dart on iPhone 15 Pro in debug mode...
Running Xcode build...                                                  
Xcode build done.                                            6.2s
Failed to build iOS app
Swift Compiler Error (Xcode): No such module 'Python'
/Users/user265210/.pub-cache/hosted/pub.dev/serious_python_darwin-0.7.1/darwin/Classes/SeriousPythonPlugin.swift:7:7

Could not build the application for the simulator.
Error launching application on iPhone 15 Pro.
chabad360 commented 1 month ago

Upon some further testing, it seems this is only an issue if I set SERIOUS_PYTHON_IOS_DIST. If I leave it unset, the build succeeds, but I'm missing my dependencies (namely, pandas).

chabad360 commented 1 month ago

Additionally, it seems to have something to do with building on an Apple Silicon mac. The release dist only includes xcframeworks for ios-x86_64-simulator not ios-arm64-simulator (or rather ios-arm64-x86_64-simulator), while building with Kivy on Apple Silicon, only produces arm64 items.

chabad360 commented 1 month ago

After further digging, it seems pretty clear that there is hard coded support for the x86_64 simulator and that is getting in the way of the arm64 one working. I can't figure out for the life of mine what needs to be changed (I looked in a lot of places), but at this point I properly give up.