This is a meta-package for building a version of Python that can be embedded into an iOS project.
It works by downloading, patching, and building a fat binary OpenSSL and Python, and packaging them both in iOS Framework format.
The site-packages
has the Rubicon Objective-C library pre-installed.
This library enables you to have direct access to the iOS system libraries
from within the Python environment.
The binaries support the $(ARCHS_STANDARD)
set - that is, armv7 and
arm64. This should enable the code to run on:
- iPhone
- iPhone 4s
- iPhone 5
- iPhone 5s
- iPhone 6
- iPhone 6 Plus
- iPad
- iPad 2
- iPad (3rd gen)
- iPad (4th gen)
- iPad Air
- iPad retina
- iPad Mini
- iPad Mini (1st gen)
- iPad Mini (2nd gen)
- iPod Touch
- iPod Touch (4th gen)
- iPod Touch (5th gen)
This repository branch builds a packaged version of Python 3.4.2. Other Python versions are available by cloning other branches of the main repository.
Pre-built versions of the frameworks can be downloaded, and added to your iOS project.
Alternatively, to build the frameworks on your own, download/clone this repository, and then in the root directory, and run:
$ make
This should:
- Download the original source packages
- Patch them as required for iOS compatibility
- Build the packages as iOS frameworks.
The build products will be in the build directory.
The approach to framework packaging is drawn from Jeff Verkoeyen, and Ernesto García's tutorials.