![]() |
Re: Python & Qt5 on Sailfish
Quote:
|
Re: Python & Qt5 on Sailfish
Some more example code to help you get you started with Python 3 + Qt 5 + PyOtherSide on Sailfish OS:
https://github.com/gpodder/gpodder-sailfish This might be a bit confusing for newcomers, as gPodder's source tree is now split over multiple Git repositories. If there's interest, I might do a more minimalistic and self-contained example of packaging PyOtherSide apps with Sailfish OS. As far as Python 2 vs Python 3 is concerned: For new projects on Sailfish OS, use Python 3, as Python 2 is slowly going away (also see PEP 404 and PEP 373 for an idea of how upstream Python sees it - the last planned maintenance release of 2.7 at the moment is May 2015, which is only one and a half years away). I won't make it harder than necessary to build PyOtherSide against Python 2, and patches to improve compatibility are welcome, as long as it doesn't make maintaining the Python 3 version more complicated. Tools like 2to3 make it really easy to migrate existing Python 2 code to Python 3, and if you've read through python2sucks, you should actually be quite happy that we have Python 3.3 in mer-python3 now ;) If you've ported your Python app to Sailfish OS already, feel free to post screenshots and a link to the Git repo or website (if available) here in this thread, and consider adding/forking it to https://github.com/sailfishapps so it's easily discoverable. |
Quote:
I'm keen to make the switch to Python 3 as soon as it is practical. My code is now Python 2/3 compatible :). However, I also feel where possible, it might be best to make use of the officially supported packages which are part of the target platform, and Sailfish is still on Python 2.7. An example of this is the python-lxml package, which I require for my app. It's available on Sailfish, but for python 2.7. Do you have any tips on how to handle these situations when packaging for Sailfish? For development purposes I set up a Python 3 virtualenv in the Sailfish emulator, and installed lxml manually. Also, I have run in to ssl problems when using Python in mer-python3. It could be that I need to install some more libraries, but openssl is already installed. Cheers! Shameless screenshot: https://pbs.twimg.com/media/BWnWMYVCQAAhf8a.png:large |
Re: Python & Qt5 on Sailfish
I can't seem to build python packages as user in the sdk. Anyone else noticed this?
Code:
+ /usr/lib/rpm/meego/brp-python-hardlink |
Re: Python & Qt5 on Sailfish
@mattaustin
Yeah that is the problem with going with python3, that you will have to hunt down libs and bindings yourself. :) Do you mean pyopenssl? https://launchpad.net/pyopenssl They exist in sailfish for py2 but if you need them for py3 you'll probably have to build them yourself ... or hunt them down in some third party repo. |
Re: Python & Qt5 on Sailfish
The hard link problem seems to be an issue with vbox in your homedir. It's proably fixable somehow but for now I just switched to using symlinks instead in /usr/lib/rpm/meego/brp-python-hardlink :
Code:
ln -sf $(basename $pyc) "$pyo"Code:
zypper ar http://enlisy.org/~xerxes2/pkg/sailfish/armv7hl/xerxes2-sailfish-armv7hl.repo |
Re: Python & Qt5 on Sailfish
Quote:
"Python 3 and Qt 5 with QML" abstract "Python 3 and Qt 5 with QML" PDF presentation |
Re: Python & Qt5 on Sailfish
Quote:
|
Re: Python & Qt5 on Sailfish
Quote:
|
Re: Python & Qt5 on Sailfish
Any experience here to be shared about submitting Python software to Jolla Harbour ?
|
| All times are GMT. The time now is 01:47. |
vBulletin® Version 3.8.8