[Python-ideas] Adding iOS/Android support to Python

Ronald Oussoren ronaldoussoren at mac.com
Sun Oct 26 16:44:09 CET 2014


> On 25 Oct 2014, at 22:58, Andrew Barnert <abarnert at yahoo.com.dmarc.invalid> wrote:
> 
> On Oct 24, 2014, at 19:20, Russell Keith-Magee <russell at keith-magee.com> wrote:
> 
> 

>> I have no idea how to tackle 4. To create a complete iOS build, you have to do at least 4 complete Python builds - a native system build (so you can run Python scripts that are part of the build), an i386 build (for the simulator), an armv7 build, and an arm64 build - and then the build products of the last three need to be combined into a single framework directory. 
>> 
>> Given three independent platform-specific build directories, it's relatively easy to construct a "fat" framework, but it isn't clear to me how that would fit into Python's build system. I can see that the build system has support for "universal" builds, which looks like an artefact of the OS X PPC->i386 conversion, but the build approach appears to be different to that required for iOS.
> 
> It's still perfectly possible to build Python universal on OS X. In fact, both the python.org builds and Apple's pre-installed builds are fat i386/x86_64.
> 
> iOS does put some limitations on things, especially when building shared libs, but if you need to fall back to building each target separately and lipo'ing them together manually, I'm pretty sure there are a few third-party libs that already use that workaround. Didn't PyObjC used to build that way?

Nope. PyObjC directly builds fat binaries without explicitly using lipo. That’s for PyObjC on OSX, I have no idea if there still is a port for PyObjC to iOS and how that’s build.

Ronald



More information about the Python-ideas mailing list