[Python-ideas] python on mobile

Russell Keith-Magee russell at keith-magee.com
Mon Dec 29 02:05:31 CET 2014


On Mon, Dec 29, 2014 at 5:30 AM, Fetchinson . <fetchinson at googlemail.com>
wrote:
>
> On 12/27/14, Russell Keith-Magee <russell at keith-magee.com> wrote:
>
> > So, that's what I've been working on. Since I posted to Python-ideas in
> > October, I've been focussing on getting the patches necessary for
> Python's
> > own build system. However, I've been distracted by work life etc, so I
> > haven't made as much progress as I would have liked. I'm hoping the
> > Christmas/New year break will give me a chance to make some headway.
> >
> > As far as Kivy goes - I have tinkered with Kivy; I've even used Kivy's
> > tools as a starting point for some of my own efforts. However, to me,
> Kivy
> > is focussing too far up the stack - their toolchain appears to be based
> on
> > getting *Kivy* working on mobile, not *Python*.
>
> What do you mean by this exactly? I thought kivy = python + some
> libraries. So if kivy works on android that necessarily means that
> python itself works as well, doesn't it?


Yes and no.

Yes, Kivy is just a set of Python libraries, and a Kivy program is just a
Python program.

However, "Hello World" in Kivy isn't 'print("Hello world")'. It's setting
up a whole Kivy stack, and starting a Kivy runloop - and the Kivy toolchain
is focussed on getting you to the point where you can start that runloop.

Even if you work around that, and just use Python "out of the box", you're
going to be carrying at least some of the overhead of Kivy.


> I thought I'd use kivy even
> if I don't need any of their fancy libraries only a basic python
> installation, but you'd say this is not a good approach?
>

It would probably work - I haven't tried, so I can't comment from
experience. However, if you go down this path, you won't have a "Basic
python installation" - you'll have "Python + kivy", because their tools
don't give you the option to *not* install the Kivy parts (at least, not as
far as I could work out).

>From my experience, getting Python compiled using Kivy's tools wasn't that
hard - but getting Kivy compiled was a PITA, because Kivy has a bunch of
other dependencies, like sound support libraries, OpenGL libraries, Cython,
and so on. These are all essential for *Kivy*, but not for Python, and not
for my purposes either.

Ultimately, I'm working on something that is, at one level, a competitor to
Kivy. I don't want my install instructions to be "install Kivy, now throw
all that stuff away and use Toga"; and I don't want my users to have to go
through the same drama of getting Kivy's whole dependency chain compiled. I
*just* want Python, and then I'll decide what other pieces I want. That's
why I'm trying to get the build fixes into Python's core - I want *Python*
to be compilable for mobile platforms, and then leave the decision of which
libraries you want to use up to the end developer.

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


More information about the Python-ideas mailing list