Adding SciPy as a required package for an iOS build #1129
Replies: 2 comments
-
You've found a gap in the packages we support at present. We haven't successfully got SciPy building with our toolchain on iOS. The complication is that SciPy requires a Fortran compiler, and we haven't worked out the set of tweaks needed to either (a) invoke a fortran compiler to produce iOS output, or (b) disable the use of Fortran entirely for iOS builds. I haven't done a comparison with PyTo to see what they've done to get SciPy working on iOS. I have no reason to believe it can't be done - we just haven't done it yet; we had a limited window of time to dedicate to getting packages compiled back when we produced the original set back in October. If you want to take a look yourself, the iOS packages are generated using this repo. As prior warning: It's 95% sticky tape and bubble gum by volume :-), but it is partially documented (see the README in the server/pypi folder), it will build packages like numpy, and the tooling is in place to build Scipy... except for the "draw the rest of the owl" part of getting Scipy to actually compile. Patches are most definitely welcome, if you're up for a challenge. |
Beta Was this translation helpful? Give feedback.
-
Unfotunately, my efforts to compile SciPy for iOS ended in failure. In browsing the web trying to find solutions for the various issues encountered, I found a ton of comments from people wanting to use SciPy on an iPad - it is definitely a dependency that is keeping many people tied to a desktop system. But my build-fu is not strong enough, hopefully a braver soul can take up the mantle. I think Emma from Pyto may be the only person in the world that has managed to do this successfully :) |
Beta Was this translation helpful? Give feedback.
-
Hi, I am trying to run Python code on an iOS device with numpy, scipy and pandas requirements. I've successfully added numpy and pandas to my briefcase build, but am running into trouble with scipy.
Both numpy and pandas are listed in the Beeware Package repo for iOS, but scypi isn't. As a test, I added the scipy requirement to my briefcase project template and was surprised to see it download and starting to build the dependency anyway, but unfortunately it failed in the build process. The error involves a cmake requirement, full log is attached.
At this point I'm not sure what is the current state of support for the scipy package using briefcase. Is it meant to work and the build issue is a bug? SciPy is available for Android via Chaquopy and is also available in the Pyto app on iOS, so it should be able to be built for iOS.
Any pointers on how I would be able to add SciPy to be used with briefcase would be much appreciated, thanks! Or if the Beeware team might be able to add scipy as a supported package in the package repo, that would be amazing! :)
Failed build log:
briefcase.2023_03_09-13_26_59.update.log
Beta Was this translation helpful? Give feedback.
All reactions