<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Sat, Oct 25, 2014 at 11:42 PM, Antoine Pitrou <span dir="ltr"><<a href="mailto:solipsis@pitrou.net" target="_blank">solipsis@pitrou.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sat, 25 Oct 2014 10:20:05 +0800<br>
Russell Keith-Magee <<a href="mailto:russell@keith-magee.com">russell@keith-magee.com</a>><br>
wrote:<br>
<span class="">><br>
> In particular, there are four areas where I can see changes required:<br>
><br>
>  1) At least 2 new sys.platform definitions - "ios" and "android" (a third<br>
> "iossimulator" platform might also be needed - the iOS simulator has enough<br>
> differences that it can be helpful to be able to identify the platform)<br>
<br>
</span>"ios" and "android" sound ok to me. A specific platform for the<br>
simulator sounds wrong, though. If it simulates iOS, it should<br>
certainly simulate its platform identification.<span class=""><br></span></blockquote><div><br></div><div>The iOS simulator is an odd beast. Yes, it's *mostly* like the actual device, but there are a couple of places where you need to be aware that you're on a simulator, and deal with it accordingly. For one thing, it's an i386 "device", rather than ARM; there are also some subtle differences in the way it deals with device "hardware", like the camera, or interacts with built-in apps (like the Photo library). </div><div><br></div><div>However, for the sake of simplicity, I'll start by assuming that there's just one "iOS" platform.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
>  2) Modifications to the build system to support cross-platform builds for<br>
> mobile - AFAICT, cross platform builds currently only work on Linux and<br>
> require readelf; iOS libraries can only be built on Mac, and building<br>
> Android libraries don't require readelf (AFAICT).<br>
<br>
</span>I don't know anything about cross-compiling. The best is that you try<br>
to whip up a patch and submit it on the tracker.<br>
<br>
Also, I suggest you tackle one system at a time. It will be easier to<br>
review and accept patches if they target only Android or only iOS, as<br>
opposed to both at the same time.<span class=""><br></span></blockquote><div> </div><div>Understood. </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
>  3) Disabling certain modules on mobile platforms. Supporting modules like<br>
> linuxaudiodev, ossaudiodev, readline, curses, idle and tkinter on mobile<br>
> platforms doesn't make much sense; modules likes bsddb and bz2 are<br>
> difficult to support due to library dependencies; and the need for modules<br>
> like multiprocessing is arguable (and difficult to support on mobile).<br>
<br>
</span>Special support for this isn't necessary. If setup.py doesn't find the<br>
necessary external dependencies, it will skip building those modules.<br>
If OTOH those modules are built, you can remove them when creating your<br>
installer (I imagine you won't use "setup.py install" on those<br>
platforms).<span class=""><br></span></blockquote><div><br></div><div>Good point - I hadn't thought of that. </div><div> </div><div>Yours,</div><div>Russ Magee %-)</div></div></div></div>