View Single Post
Posts: 1,269 | Thanked: 3,961 times | Joined on May 2011 @ Brazil
#1
***********************************************

See Sailfish/Python Development wiki page and post#83 for recent news about Python 3, PyOtherSide and PyQt5 for Sailfish.

***********************************************

Here in this topic we can discuss programming with Python & Qt5 on Sailfish OS. Since Sailfish SDK alpha 2 it needs Qt5 and Wayland (no X11 at the moment), Python (with GUI) has to find some solution to run on Sailfish (XWayland, PySide / PyQt for Qt 5 or PyOtherSide).

Bringing some comments from other topic :
==========================================
The current situation for mobile developers from Maemo/MeeGo/Nemo Mobile to Sailfish pathway is IMHO :

1) softwares in C/C++/Qt 4.7-4.8 (Qt Quick 1) : about 80-90% of MeeGo Harmattan and Nemo Mobile softwares, just some % of Maemo 5 softwares. Anyway due to migration from GUI written in (Harmattan, etc) Qt Quick components to Sailfish Silica (Qt Quick components for GUI in Sailfish OS), there is a need of small-medium source code revision & rewrite. There are 2 options for Qt5/Wayland migration :

1.a) XWayland (X11 running as a Wayland client) be available by Jolla and/or community, so all Qt 4/X11 softwares will remain compatible. Jolla said "just to clarify, while we don't support xwayland atm, we're not ruling out the possibility in future...". It seems XWayland source code isn't long, just some hundreds of lines of code. So, as Jolla itself is open to include XWayland (with the community help, i.e., in Nemo Mobile Wayland effort) and XWayland is a lot smaller than Wayland, I think it is possible to have XWayland ready on Sailfish OS until the end of 2013 (but not included in the Sailfish SDK beta which is soon to be released);

1.b) migrate to Qt 5/Qt Quick 2, which seems to be easy, with minor source code revision & rewrite, then recompile. This work may be worth to also release Qt 5 versions for Ubuntu Touch, Android and iOS (changing from the Qt components from Silica to Qt Components for Ubuntu or Qt Quick Controls);

2) softwares in Python/PySide/Qt 4.7-4.8 (Qt Quick 1) : only about 10-20% of MeeGo Harmattan and Nemo Mobile softwares, just some small % of Maemo 5 softwares. But Python is important, allowing party-time developers to code on device (N900, N9, etc), anytime, anywhere, and contribute to the software diversity. The same migration from Harmattan (etc) Qt Quick components to Sailfish Silica is needed, with small-medium source code revision & rewrite. There are more options for Qt5/Wayland migration, none ready at the moment :

2.a) the same (1.a) option, i.e., release XWayland for Sailfish OS, so PySide and Qt 4.8 could be used in Sailfish as in Sailfish SDK alpha;

2.b) port PySide to Qt5/Qt Quick 2, which has no timeline and is a huge task needing contribution. This effort would benefit Sailfish, Ubuntu Touch, Android and iOS developing in Python/Qt5/Qt Quick 2. So it is expected that Jolla will not contribute (alone) for this huge work;

2.c) use a future PyQt 5 version, because the current one excludes Qt Quick 2. There is also the issue of GPL license and release PyQt 5 for Mer/Nemo/Sailfish;

2.d) use PyOtherSide from thp, which will have a version for Qt5/Qt Quick 2 released soon. It is not a Qt 5 full binding for Python, but it seems a way to code (the GUI) in Qt Quick 2 and call Python from it (so Qt5 is not available from Python, only Python is available from Qt5/Qt Quick 2). As advantages, PyOtherSide is smaller, faster to load and is/will be multiplataform (Symbian, Android, MeeGo, Sailfish, Ubuntu Touch, etc).

So, non-Python developers have a migration path currently available to Qt5/Wayland on Sailfish. Only Python developers are in a wait-to-see/code situation, the easier one seems to be PyOtherSide (2.d).

About the change from Sailfish SDK alpha (with Qt 4.8 & X11) to Sailfish SDK beta (Qt 5 & Wayland) : yes, it is a bad surprise for developers who have already ported/created softwares using Sailfish SDK alpha. But currently there are a very small number (10-20) of softwares written for Sailfish, see the app list in Sailfish - Mer Wiki. So this 'collateral effect' is small.

I trust the Linux/Maemo/MeeGo/Mer/Nemo/Sailfish community efforts so that more than one good solution will be available for developing Sailfish softwares.

I hope XWayland will be released on Sailfish, so X11 legacy will be available : ssh -X, chrooting Debian/etc, many Linux desktop softwares not Wayland compatible, etc.
==========================================

Other comments :
==========================================
More news about PyQt 5 and Qt 5/Qt Quick 2 support :
- PyQt 5.0.1 (next release) will have Qt Quick 2 support, and PyQt 5.1 will have Qt 5.1 support, see
PyQt and Qt 5.1 discussion.

So, in theory, PyQt 5.1 will give Python access to develop softwares (with GUI) for Sailfish, Ubuntu Touch, Android, iOS, etc. Obviously somebody needs to compile PyQt for them.

PyQt 5.0 was released in June 16th, I haven't found any estimate date for PyQt 5.0.1 and 5.1. But PyQt 5.0.1 is the current development snapshot, see the change logs which says "Completed the initial implementation of the QtQuick module" in July 20th.

We Python developers (for Sailfish, etc) should pay attention to PyOtherSide and PyQt 5.x developments.
==========================================
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral, Derivative, Limit - calculating mathematical integrals, derivatives and limits. SymPy - Computer Algebra System.
MatPlotLib - 2D & 3D plots in Python. IPython - Python interactive shell.
-- My blog about mobile & scientific computing ---
Sailfish : Sony Xperia X, Gemini, Jolla, Jolla C, Jolla Tablet, Nexus 4. Nokia N9, N900, N810.

Last edited by rcolistete; 2014-06-11 at 00:21.
 

The Following 11 Users Say Thank You to rcolistete For This Useful Post: