[Mobile-sig] python on android

Russell Keith-Magee russell at keith-magee.com
Sat Feb 28 01:40:09 CET 2015


On Sat, Feb 28, 2015 at 2:22 AM, Ethan Furman <ethan at stoneleaf.us> wrote:

> On 01/27/2015 08:26 AM, Fetchinson . wrote:
>
> > First of all thanks a lot for creating this mailing list. I sent the
> > original mail to python-ideas [1] referenced by Jeff on meta-sig [2].
> > My perspective is that of a developer of python programs (mostly hobby
> > projects) and not developer of python itself.
> >
> > What I'd like to see is a python distribution for android (I'm aware
> > of the fact that this is mobile-sig and not android-sig, but for me
> > personally android matters a lot more than other mobile platforms)
> > that is as reliable as the linux/macos/windows distributions released
> > by the python core dev team. Ideally, each time a new python version
> > is released not only linux/macos/windows installers should be
> > available on python.org but also android probably in the form of an
> > installable apk. And just as there are platform specific features for
> > e.g. windows that are not available on linux, there of course would be
> > android-only features in the android distribution like hardware
> > related libraries like camera, gps, accelerator, etc. sensors and
> > probably more.
> >
> > Currently there is no single officially blessed (i.e. psf blessed)
> > python distribution for android. There are various approaches, kivy
> > [3], sl4a [4] and more [5]. But these are either dead projects or
> > accomplish much more than a vanilla python distribution. What I'd like
> > to see is an environment whose goal is to be "just" the python core
> > plus about as much platform specific feature as there are for the
> > others, linux/macos/windows.
> >
> > Of course the whole enterprise depends on the willingness of core
> > python dev folks to dedicate time and energy to maintaining a code
> > base that one can compile for android also which is not a small feat.
> > I'm not sure they have this time and energy and I of course wouldn't
> > blame them, this is open source, people do it in their free time.
> >
> > I merely would like to gauge the community's interest in something
> > like this. Maybe if many users show interest then the core python dev
> > folks can be convinced that this would be a worthy effort.
>
> PEP 11 [1] has been updated to clarify what is need to officially support
> a platform:
>
>    First, a core developer [2] needs to volunteer to maintain
> platform-specific code.
>
>    Second, a stable buildbot must be provided.
>

Are you able to clarify exactly what is required to comply with this second
point?

In the case of iOS, for example, there's currently at least 4 architectures
that need to be tested - 2 simulator architectures (i386 and x86_64), and
at least 2 device architectures (ARMv7s and ARM64 at a minimum; ARMv7 and
ARMv6 may also be desirable). The simulator architectures can only run on a
physical OSX machine; the device architectures require a physical tethered
iPod/iPhone/iPad with the appropriate CPU type.

Does this mean that in order for iOS to be a PEP11-compliant supported
platform, it would be necessary to get physical hardware to a particular
server farm somewhere? Or could I (for example) hook up a laptop and some
iPods in my office and have it connect to a build server? What QoS
requirements exist for that iOS build rig - Is it necessary for the rig to
be continuously online and available, or can it be fired up once a week, or
once a month, or once a release, to check compliance of any recently added
code?

To that end - since any iOS build needs to be built on a Mac, which build
slave is used to verify the OS/X build at present? The only candidate I can
see that might be an OS/X build is "bolen-tiger" (assuming tiger is a
reference to OS/X 10.4 - it isn't clear to me that it is).

I volunteer to maintain the android specific code (I have zero
> qualifications to help with any other mobile platform),
> and I am working on providing a stable buildbot for the android platform.
>
> Cyd has successfully built 3.4.2 in a KBOX environment on his android
> device, and is working on making the patches
> accessible (thanks, Cyd!)
>
> While Cyd's efforts are an important first step, I think many users are
> not going to want to install KBOX to get Python,
> so what are the other options?
>

A completely native build without KBOX is entirely possible (and, to my
mind, preferable). Matt's build is pretty close AFAICT - it just needs some
configure.ac tweaking to get rid of the last manual pyconfig.h overrides,
and, IMHO, a specific platform module for Android (as I've said previously
in this forum, I don't believe an Android device should identify as
"Linux", or iOS as "Darwin", because those identifiers are misleading on
mobile devices).

However, it's also important to establish what "it" is when we are talking
about Python on Mobile. The idea of a "stock TTY-based Python shell" on
mobile is, IMHO, a folly. The idea that the distributable product from
python.org would be "an installable Python APK/IPA that gives the same (or
similar) experience as desktop Python" is also, IMHO, a folly. The best we
can hope for is a version of libPython.a that can be embedded into another
executable, plus the standard library. Building the rest of the UI needed
to support "IDLE on a mobile device" is a much bigger project, and one that
is, IMHO, way out of scope for Python core.

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


More information about the Mobile-sig mailing list