[Mobile-sig] Yet Python 3 build for Android & possible solution for GUI apps

Russell Keith-Magee russell at keith-magee.com
Tue Feb 10 00:55:56 CET 2015


On Mon, Feb 9, 2015 at 7:34 PM, David Boddie <david at boddie.org.uk> wrote:

> On Sun Feb 8 19:44:08 CET 2015, Martin Kolman wrote:
>
>  As we appear to be in the phase of "hunting for working Python 3 Android
>> build", this is what I have been using:
>>
>> https://github.com/thp/python3-android/tree/fixes
>>
>> As far as I can tell it works fine once built with the Android NDK for
>> armv7 Android, just a few modules are missing
>> for some reason: csv, statvfs and sqlite
>>
>
> I just tried this and was slightly surprised to find that it ran through
> to completion, producing a binary for ARM. I didn't really like the way
> it insists on downloading all the sources it needs, but I understand why
> it does this. My experience with this kind of thing is that you can only
> provide patches for certain combinations of component versions, so making
> it configurable is difficult. Well done to Thomas Perl for getting it to
> work!
>

FTR - the "download and patch" approach is also the approach taken by Kivy
(and by extension, Python-Android-support).

There are several reasons this approach is helpful.

Firstly Python's out-of-the-box sources need to be patched, and so do most
of the binary library dependencies, and patching sources is an easy process
to automate.

Secondly building for a mobile platform usually means building at least
twice - a host build and a target build. In the case of iOS, you need 3
builds - one for the simulator and one for the device, and the two binaries
then need to be merged into a single "fat" library.

The standard autoconf tools have really good support for building a single
source tree for a single platform; building multiple versions and merging
the results isn't an area where it is as capable. So - a 'helper' script
like this is an almost inevitable part of the whole process. What I'm not
clear on is:

 1) Whether this helper script needs to be part of the "official"
distribution
 2) If it does, where is the right place to put the helper script.

However, getting the patches for the existing build tools is still the
first step.

Yours,
Russ Magee %-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/mobile-sig/attachments/20150210/09f1c528/attachment.html>


More information about the Mobile-sig mailing list