Monday, June 1, 2015

Simplified script to cross-compile Python-4-Android for both ARM NEON and x86

I've created a simple script to cross-compile Python-4-Android for both the ARM NEON AND x86 architectures. This script only works with the patched Python-4-Android archive you can download from this post. I successfully ran the script on a Ubuntu 13.04 machine using the Android NDK version r9c.

First download both the make.sh script and python-for-android.tar.bz2 files in the same directory:




Cross-compiling Python-4-Android for ARM NEON

To cross-compile for ARM NEON, run make.sh with the following options:

$ make.sh -x -n /path/to/android-ndk-r9c -a armeabi-v7a-NEON -t arm-linux-androideabi-4.8


Cross-compiling Python-4-Android for x86

To cross-compile for x86, run make.sh with the following options:

$ make.sh -x -n /path/to/android-ndk-r9c -a x86 -t x86-4.6