Skip to content
This repository was archived by the owner on Mar 30, 2019. It is now read-only.
/ Python-iOS-support Public archive

A meta-package for building a version of Python that can be embedded into an iOS project.

License

Notifications You must be signed in to change notification settings

pybee/Python-iOS-support

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python iOS Support

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 static libffi.a and libPython.a, 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_32_BIT) set - that is, armv7 and armv7s. This should enable the code to run on:

  • iPhone
    • iPhone 3GS,
    • iPhone 4
    • iPhone 4s
    • iPhone 5
    • iPhone 5s
  • iPad
    • iPad 2
    • iPad (3rd gen)
    • iPad (4th gen)
    • iPad Air
  • 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 2.7.1. Other Python versions are available by cloning other branches of the main repository.

Quickstart

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:

  1. Download the original source packages
  2. Patch them as required for iOS compatibility
  3. Build the packages as iOS frameworks.

The build products will be in the build directory. You'll need to add all these frameworks (not just Python.framework) to your project.

Acknowledgements

This work draws on the groundwork provided by Kivy's iOS packaging tools.

The approach to framework packaging is drawn from Jeff Verkoeyen, and Ernesto García's tutorials.

About

A meta-package for building a version of Python that can be embedded into an iOS project.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •