| 1 | ==== Building Python for Android (Kivi)==== |
| 2 | Based on [http://python-for-android.readthedocs.org/en/latest/prerequisites/ python-for-android documentation], built on Ubuntu 12.10 64-bit. |
| 3 | |
| 4 | Install prerequisites: |
| 5 | {{{ |
| 6 | sudo apt-get install build-essential patch git-core ccache ant python-pip python-dev |
| 7 | }}} |
| 8 | |
| 9 | On a 64-bit distro: |
| 10 | {{{ |
| 11 | sudo apt-get install build-essential patch git-core ccache ant pip python-dev |
| 12 | }}} |
| 13 | |
| 14 | Ensure you have the latest Cython version: |
| 15 | |
| 16 | {{{ |
| 17 | sudo pip install --upgrade cython |
| 18 | }}} |
| 19 | |
| 20 | Python for Android (the Kivi one) seems to build only with NDK-r7, so the NDK in current Necessitas SDK (NDK-r8b) can't be used. Just download the r7 NDK unpack it somewhere and set the NDK path. |
| 21 | |
| 22 | {{{ |
| 23 | wget http://dl.google.com/android/ndk/android-ndk-r7-linux-x86.tar.bz2 |
| 24 | tar xvf android-ndk-r7-linux-x86.tar.bz2 |
| 25 | }}} |
| 26 | |
| 27 | The Android SDK from Necessitas can be used, just make sure API 14 is installed. |
| 28 | |
| 29 | |
| 30 | {{{ |
| 31 | cd python-for-android |
| 32 | |
| 33 | export ANDROIDSDK="<path to some android SDK that has API 14>" |
| 34 | export ANDROIDNDK="<path to android ndk>" |
| 35 | export ANDROIDNDKVER=r7 |
| 36 | export ANDROIDAPI=14 |
| 37 | |
| 38 | ./distribute.sh -m "pyjnius kivy" -f |
| 39 | }}} |
| 40 | |
| 41 | == Having build issues ? == |
| 42 | * try to build on Ubuntu 12.04 with NDK r7 |
| 43 | * try the [http://python-for-android.readthedocs.org/en/latest/android/#prebuilt-virtualbox Virtualbox image] pre-configured for building Python for Android |