Skip to content
Build script for compiling python into a static library that can be used with the official SDK
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore removed fetching of patch Dec 5, 2010
Python-2.6.5-xcompile.patch removed fetching of patch Dec 5, 2010
README added pessimism to README Jun 5, 2012


Simple script to fetch, patch and build python for the iPhone and
iPhone Simulator

    This project never really got python running on the iPhone to my satisfaction,
    and I can't recommend using it for any serious project at this stage.

    Most notably missing is pyobjc support (which turns out to be much harder to
    port to iPhone since it relies on more platform-specific code)

    Also missing is the ability to statically compile modules, (all are currently
    built as dylibs which works for development, but to my knowledge wouldn't be
    allowed in the App Store)

    At this point this project is mostly meant to be a starting point for anyone
    smarter than me who wants to and can tackle the above issues.

    I really wish it were practical to write apps entirely in Python, but at this
    point it seems impossible.

Last known to work on Xcode 4.3.2 SDK 5.1 (works on my machine anyway)

The final products are located in `Python-2.6.5/_install/'

the most interesting files for iPhone development being
 * include/
 * lib/libpython2.6.a
 * lib/python2.6/

To compile with Xcode, add libpython2.6.a to your project and copy the
directory `lib' into your resources folder. You will also need to add
`include' to your header search path.

Known bug:
 * spaces cannot be present in path (most likely an issue with the Python Makefile)

You can’t perform that action at this time.