will pyinstaller create app for PyQt/Qt5.2/android ??

1,674 views
Skip to first unread message

Lloyd Konneker

unread,
Oct 20, 2013, 1:36:53 PM10/20/13
to pyins...@googlegroups.com
Will pyinstaller create a Python/PyQt/Qt5.2 app for Android?
 
This question is forward-thinking because Qt5.2 is soon released and SHOULD support Android.
 
Suppose Android (based on the Linux kernel) supports dynamically loaded libraries. I'm still fuzzy about whether the Pyinstaller bootloader is compatible with the Android kernel ( to start a Python interpreter as a subprocess) and whether the kernel would load dynamic libraries.  Or do you need a very small Java program to start the ball rolling, bundled in an apk?

Martin Zibricky

unread,
Oct 20, 2013, 5:58:37 PM10/20/13
to pyins...@googlegroups.com
Android and apk is out of scope of pyinstaller. Look at the following tool for
android and apk support:

https://github.com/kivy/python-for-android

Lloyd Konneker

unread,
Oct 22, 2013, 11:04:35 AM10/22/13
to pyins...@googlegroups.com
>Android and apk is out of scope of pyinstaller.

Is it a technical obstacle?  Thats my main interest.  Android might be a Linux distribution (depends on who you ask) so I wonder how it might differ enough to prevent using PyInstaller.  I should just try it and find out myself.

Is there not enough demand from app developers?  Python and PyInstaller are important tools, and Android is ubiquitous, so logically ....

I understand that there are limited resources from PyInstaller developers.  Thank you for your hard work.   python-for-android pales in comparison with the quality of PyInstaller.

Hartmut Goebel

unread,
Oct 22, 2013, 11:29:36 AM10/22/13
to pyins...@googlegroups.com
Am 22.10.2013 17:04, schrieb Lloyd Konneker:
Is there not enough demand from app developers?  Python and PyInstaller are important tools, and Android is ubiquitous, so logically ....

Supporting more platforms by PyInstaller is interesting, esp. if a common config-file (our .spec-file) can be used on all platforms. I'm looking forward for what you find out. (If I'd asked, I would wish a QT sample application running on X11 and Adroid be just re-packaging it in PyInstaller :-).

For what you plan, these inks may be usefull:
http://qt-project.org/wiki/Qt_for_Android_FAQ
http://qt-project.org/wiki/How_to_Create_and_Run_Qt_Application_for_Android
http://thp.io/2011/pyside-android/

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/2011-10-aus-der-schublade-in-die-koepfe
Blog: http://www.goebel-consult.de/blog/sundenfall-habe-piwik-installiert

Goebel Consult ist Mitglied bei http://www.7-it.de/

Lloyd Konneker

unread,
Jan 17, 2014, 10:55:51 AM1/17/14
to pyins...@googlegroups.com
Progress report:

I tested that the pyinstaller bootloader builds cleanly for Android.  In other words, the bootloader dependencies (libc and libz) are in the Android NDK.  I used a more or less standard build environment (cross platform): Eclipse with the Android ADT plugin etc.  The only new artifact in the project is a small Android.mk (makefile.) pointing to the bootloader source and libz header.

I did not test that it would execute, nor did I build an Android package (.apk) that you could click on to execute the bootloader.

Probably the next step is to build a Python for Android (which others have done already?) and test whether Python in the Android simulator would execute the Pyinstaller script to build a package (that includes the bootloader and the Python executable.) An alternative, cross-compile approach  would be to run Python on Pyinstaller script on say a Linux dev machine, targeted for Android.  I don't favor the cross-compile approach since that breaks the mold that Pyinstaller always runs in the target environment.  But whether you can build an .apk in the simulator is also an open question.

I haven't consider what Universal Binary requires for this endeavour.

Hartmut Goebel

unread,
Jan 19, 2014, 7:47:55 AM1/19/14
to pyins...@googlegroups.com
Am 17.01.2014 16:55, schrieb Lloyd Konneker:
Progress report:

Great news! Thanks a lot for sharing!

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Lloyd Konneker

unread,
Feb 8, 2014, 7:39:12 AM2/8/14
to pyins...@googlegroups.com
I think this issue is a dead end and that the answer (given early in this thread) "it is out of scope" is correct.

Pyinstaller has never been a cross-compiler, but that is what is needed for Android, since there is not such a thing as a native Android development machine.  You always develop for Android in a non-Android environment (as far as I know.)

The thing that Pyinstaller does (package a bootloader and an archive of all needed libraries) is duplicated by other projects for  the Android platform.  For example, PyDroid and android-python27 projects both bundle a bootloader (written in Java) that unpacks the Python interpreter and other scripts from an archive, sets up an environment, and executes the Python interpreter.  So my advice to others wanting to port Python apps to Android is to start with one of those tools.  (However, in my experience, those tools are much less mature than Pyinstaller and poorly documented.  It has been a struggle for me to understand how to use those tools.)

Only if the Pyinstaller project were willing to generalize (allow for cross-packaging and allow for bootloaders in other languages) would this idea make sense.  And that doesn't make economic sense since probably most apps are not intended for mobile, and most app development for mobile is not in Python.

Laurence Anthony

unread,
Feb 8, 2014, 9:17:26 AM2/8/14
to pyins...@googlegroups.com
Good analysis by Lloyd, but I would love the beauty of Pyinstaller to be available on mobile platforms. It would be a killer app if it could be done.

Laurence.

###############################################################
Laurence ANTHONY, Ph.D.
Professor
Center for English Language Education in Science and Engineering (CELESE)
Faculty of Science and Engineering
Waseda University
3-4-1 Okubo, Shinjuku-ku, Tokyo 169-8555, Japan
E-mail: antho...@gmail.com
WWW: http://www.antlab.sci.waseda.ac.jp/
###############################################################


--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller...@googlegroups.com.
To post to this group, send email to pyins...@googlegroups.com.
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/groups/opt_out.

Hartmut Goebel

unread,
Feb 8, 2014, 9:24:44 AM2/8/14
to pyins...@googlegroups.com
Am 08.02.2014 13:39, schrieb Lloyd Konneker:
Pyinstaller has never been a cross-compiler
[...]

Only if the Pyinstaller project were willing to generalize (allow for cross-packaging and allow for bootloaders in other languages) would this idea make sense.  And that doesn't make economic sense since probably most apps are not intended for mobile, and most app development for mobile is not in Python.

Well, if one provides a cross-compiled Python, it should be easy to make PyInstaller create cross-bundles :-)

Please keep in mind that there are two different issues involved:

1) Collect everything which need to be collected. Unfortunately this includes platform dependant libraries, which to collect may become hard.

2) Having a bootloader. We would be glad including bootloaders for other platforms, but we will not be able to maintain them.This may require some changes to the bundle-code, but this should be feasible.

Did you ask the other projects if they'd like to join forces?

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Reply all
Reply to author
Forward
0 new messages