wiki:PySideForAndroid

Version 3 (modified by Martin Kolman, 11 years ago) (diff)

--

PySide for Android

This article describes:

  • how to build Shiboken & PySide for Android using the Necessitas SDK
  • how to use the resulting libraries
  • and how to bundle them with your Python program in a standalone APK

NOTE: If you just wan't to run you Python & PySide programs on Android, you can skip the Building PySide section.

Building PySide

Preparation

First install the prerequisites:

  • Necessitas SDK

(make sure you have the Android SDK platform 14 installed in it)

  • system-wide installed Shiboken
  • system-wide installed Python 2.7
  • Python 2.7 compiled for Android
  • cmake
  • git

This command should probably fetch most of the prerequisites on Ubuntu:

sudo apt-get install build-essential cmake git python2.7-minimal shiboken

If you find some are is missing or if you wan't to provide similar command for other distributions, let me know ! :)

Then clone the Android-pyside-build-scripts project and cd to it's directory:

git clone git@github.com:M4rtinK/android-pyside-build-scripts.git
cd android-pyside-build-scripts

Now run the prepare.sh script:

./prepare.sh

It clones Android-modified Shiboken & PySide and creates some folders needed for the build.

And that's it, you are ready to start the build. :)

Build

Results

Acknowledgement

As usual with open source development, I haven't done all of this single handedly, but built on work done by others previously. So I'd like to both acknowledge on which work this is build upon and also provided links to the sources I've used:

Thanks a lot - without you, this would not be possible! :)