GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - benfogle/python-cross-compiling-example: Example makefiles to cross-compile a non-trivial Python app for Android. Demos crossenv.

BranchesTags
Open more actions menu

Latest commit

 

History

33 Commits
33 Commits

Folders and files

NameName
Last commit message
Last commit date
compiler-rt
compiler-rt
 
 
docker
docker
 
 
examples
examples
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
Makefile
Makefile
 
 
README.rst
README.rst
 
 
apython
apython
 
 
bzip2.mk
bzip2.mk
 
 
crossenv.mk
crossenv.mk
 
 
examples.mk
examples.mk
 
 
freetype.mk
freetype.mk
 
 
functions.mk
functions.mk
 
 
libffi.mk
libffi.mk
 
 
libjpeg.mk
libjpeg.mk
 
 
openssl.mk
openssl.mk
 
 
package.mk
package.mk
 
 
png.mk
png.mk
 
 
python-interp.mk
python-interp.mk
 
 
python-modules.mk
python-modules.mk
 
 
toolchain.mk
toolchain.mk
 
 

Repository files navigation

Python Cross Compiling Example

This repository is a worked example of cross compiling a non-trivial Python app to run on Android. It is the companion to the Python Cross-Compiling Guide (as yet unpublished). The makefile above will download all dependencies, build them, and produce a tarball containing:

  • Python 3.6 for Android (ARM)
  • numpy
  • Pandas
  • matplotlib
  • Pillow
  • Example Python scripts

Building

The makefile is written and tested on Ubuntu 16.04. Consult docker/Dockerfile in this repository for details of the prerequisites that should be installed on the build machine.

To build, it should be enough to run make.

To build using Docker:

$ docker run --rm \
    -v /path/to/working:/working \
    -v /path/to/output:/output \
    -v /path/to/this/repo:/source \
    benfogle/python-cross-compiling-example

Where working is a scratch directory for intermediate build files.

Running

To run, use adb to push the resulting files to the Android device. Rather than run Python directly, which requires setting LD_LIBRARY_PATH, run the script bin/apython, which will set it for you. Examples are in the examples directory.

About

Example makefiles to cross-compile a non-trivial Python app for Android. Demos crossenv.

Resources

Readme
MIT license
Activity

Stars

6 stars

Watchers

1 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.