https://github.com/sjkingo/python27-arm-xcompile
Build script and patches for cross-compiling Python 2.7.3 to target ARM
https://github.com/sjkingo/python27-arm-xcompile
arm cross-compile python python-2-7
Last synced: 4 months ago
JSON representation
Build script and patches for cross-compiling Python 2.7.3 to target ARM
- Host: GitHub
- URL: https://github.com/sjkingo/python27-arm-xcompile
- Owner: sjkingo
- Created: 2013-04-29T01:51:40.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-04-29T02:46:06.000Z (over 12 years ago)
- Last Synced: 2024-12-20T13:32:41.632Z (about 1 year ago)
- Topics: arm, cross-compile, python, python-2-7
- Homepage:
- Size: 107 KB
- Stars: 32
- Watchers: 4
- Forks: 54
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
python-arm-xcompile
===================
This is a build script and patches for cross-compiling Python to target the ARM architecture.
You must have a cross-compile toolchain already set up. [This guide](http://akanto.wordpress.com/2012/10/02/cross-compiling-kernel-for-raspberry-pi-on-fedora-17-part-2/) is an excellent resource for setting up crosstool-ng.
1. Edit `build.sh` and change the variables at the top to match your environment.
2. Run `build.sh`. This will download Python and build it for you.
Assuming the build succeeds, a list of modules will be printed out. Some modules
will not build statically since they need to be dynamically linked to glibc (TODO).
Python 2.7.4 unsupported
------------------------
Note that Python 2.7.4 introduced breaking changes to _sre.MAXREPEATS that will
fail to cross-compile statically. You must use 2.7.3 instead (for now) --
`build.sh` will download and extract this for you.
Credits
-------
* The `files/Python-2.7.3-xcompile.patch` file is modified from the patch given by
Lothsahn on the [Cross Compiling Python for Embedded Linux](http://randomsplat.com/id5-cross-compiling-python-for-embedded-linux.html) post.
* http://stackoverflow.com/a/1155092 for statically compiling Python interpreter.