Skip to main content


Showing posts from February, 2018

Enaml Native - New build system for cross compiling Python for iOS and Android coming

Besides speed, I think the biggest barrier preventing python from making it's way onto mobile is the lack of a good way of cross compiling python and all the extension modules that are commonly required for mobile devices.

This is not exactly straightforward, nor standardized (at all), but it's actually not too bad if you have a lot of time and don't mind waking up in the morning with CFLAGS and LDFLAGS flying through your head.  Still, it's extremely time intensive and is not an option for someone with deadlines nor for the person trying to learn python.

I think it's time for something different.

Existing options
While there have been many scattered projects here and there for cross compiling Python for Android or iOS, most don't support building 3rd party extensions.  The only projects that I know that do provide this are kivy's subprojects python-for-android and kivy-ios.

While these are great and very popular, they were written close to 7+ years ago be…

A look at Chaquopy the Python SDK for Android

I recently heard about chaquopy - A "Python SDK for Android" and was really excited. There's already a demo app on the Play store for python 2 and python 3. As the author of enaml-native, I had to take a look to see how others are trying to tackle the python on android challenge.  So here's a short review and discussion of my initial thoughts on chaquopy.

Demo I encourage you to try out the demo yourself to get a feel for it, but here's a short demo of what it does.

Initial thoughts. It starts reasonably fast (about 3-4 seconds on my phone).  There's a noticeable delay when starting the python activity on my phone (much smoother on the emulator), but other than that the widgets look great and interaction is smooth!

The apk is 11.54 MB and the app is only 18 MB installed (21MB if you include the cache), which is very good for bundling python!

Also, the build process was a piece of cake!  I cloned the repo, opened in android studio, pressed play, and it worked!…