[PyQt] pyqtdeploy: howto add egg's?

Phil Thompson phil at riverbankcomputing.com
Wed Feb 3 14:35:21 GMT 2016


On 3 Feb 2016, at 2:02 pm, Schluchti <schluchti at gmail.com> wrote:
> 
> Hi all,
> 
> I am using pyqtdeploy to create PyQt Applications for Android. It took me
> some time, but finally I got a simple PyQt application working on Android.
> Now, I would like to add some additional modules to my PyQt application - in
> particular "pycrypto". Therefore, I downloaded the pycrypto sourcecode,
> compiled it with the Android NDK compiler toolchain against my statically
> compiled Python and created a *.egg file. 
> 
> But now I'm a little bit lost...how can I add the Python egg to pyqtdeploy?
> According to the pyqtdeploy documentation I should add the Python egg to the
> sys.path file, right? I did this, by adding the following path to sys.path:
> "C:\tomatoview-app\static_android_libs\ext\pycrypto-2.6.1-py3.4.egg".
> Unfourtunately this doesn't work...when I try to import something from
> pycrypto (e.q: from Crypto.Cipher import blockalgo) I'm always getting
> "ImportError: No module named 'Crypto'". 
> 
> I also tried to unpack the generated *.apk file to check if it contains the
> pycrypto library, but there is nothing pycrypto related in there. 
> 
> What am I doing wrong? I would really appreciate any help. 

You have to add the .egg to the .apk yourself. Alternatively build the package differently so that it can be statically linked with your application.

Phil


More information about the PyQt mailing list