Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
# - Based on https://github.com/nonameentername/python-android modified for my needs
# - Tested on Ubuntu 11.04-i386 with Android NDK-6b and NDK-7c, gcc/g++ 4.4 and gcc/g++ 4.5


# 1) Host machine dev env config if needed (package list for 32bit host, package names for 64bit may change)
# check installed package on host machine with: zcat -f /var/log/dpkg.log* | grep "\ install\ " | sort

sudo apt-get install build-essential cpp-4.4 g++-4.4 gcc-4.4-base gcc-4.4 bison flex autoconf automake autotools-dev quilt libcurl3 curl openssh-server ant mercurial filezilla pure-ftpd dpatch texinfo libncurses5-dev libgmp3-dev libmpfr-dev gawk patchutils binutils-dev zlib1g-dev 
#sudo apt-get install git-core gnupg gperf libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc (Ubuntu 11)
#sudo apt-get install git-core gnupg gperf libc6-dev x11proto-core-dev libx11-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc libreadline-dev libreadline6 ia32-libs-multiarch libzip-dev libzip-dev libzzip-dev libzzip-0-13 (Ubuntu 12)

# 2) build python 2.7.2 for Android

export NDK="/home/tony/Desktop/xcross/android-ndk-r7c"
export SDK="/home/tony/Desktop/xcross/android-sdk-linux_x86/"
export NDKPLATFORM="$NDK/platforms/android-9/arch-arm"
export PATH="$NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:$NDK:$SDK/tools:$PATH"

bash bootstrap.sh && build.sh && package.sh

-------

# Eli's journey

1. I'm using ubuntu [ubuntu-12.04.3-dvd-i386](http://old-releases.ubuntu.com/releases/releases/12.04/release/ubuntu-12.04.3-dvd-i386.iso) (32-bit), tried ubuntu-12.04.3-desktop-amd64+mac (64-bit) doesn't work.
2. check your gcc version, make sure you are using gcc-4.4, mine defaulted to gcc-4.6.
3. [android-ndk-r7c](http://dl.google.com/android/ndk/android-ndk-r7c-linux-x86.tar.bz2)
4. [andriod-sdk](https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz)

-------

./bootstrap.sh
    Downloads Python-2.7.2 source
    patches Python for android
    builds hostpython and hostpgen

./build.sh
    builds python library for android

./package.sh
    creates python_rxx.zip and python_extras_rxx.zip


current status:
    Python build finished, but the necessary bits to build these modules were not found:
    _bsddb             _curses            _curses_panel
    _tkinter           bsddb185           bz2
    dbm                dl                 gdbm
    imageop            linuxaudiodev      nis
    ossaudiodev        readline           sunaudiodev
    To find the necessary bits, look in setup.py in detect_modules() for the module's name.


    Failed to build these modules:
    _ctypes_test       _locale            audioop
    grp                spwd