Bug 391748 - Flatpak runtime doesn't include PyQt5
Summary: Flatpak runtime doesn't include PyQt5
Status: REPORTED
Alias: None
Product: Qt/KDE Flatpak Runtime
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-12 10:57 UTC by Carles
Modified: 2020-10-30 01:10 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Carles 2018-03-12 10:57:01 UTC
The org.kde.Platform flatpak runtime doesn't include PyQt5. This makes packaging python applications using it somewhat inconvenient, as it involves building PyQt5 and bundling it with the application.
Comment 1 Ghislain Vaillant 2018-03-31 22:12:15 UTC
(In reply to Carles from comment #0)
> The org.kde.Platform flatpak runtime doesn't include PyQt5. This makes
> packaging python applications using it somewhat inconvenient, as it involves
> building PyQt5 and bundling it with the application.

This. I have got three applications using PyQt5, either directly or via a shim module like QtPy, and a KDE runtime with PyQy5 already included would definitely help.
Comment 2 Erin Yuki Schlarb 2020-10-29 22:47:22 UTC
I was wondering the same. Also reassigned “Qt/KDE Flatpak Runtime” as that is were https://invent.kde.org/packaging/flatpak-kde-runtime/ points to.
Comment 3 Aleix Pol 2020-10-29 23:48:40 UTC
I've thought about doing something about it but I don't think it's worth the effort at this point, especially considering how there's both PySide (Qt for Python now) and PyQt5.

It would surely be possible to have an extra org.kde.python.Platform kind of thing. Or an extension should be possible as well, haven't explored this approach, it would be welcome if someone did.

The biggest problem with basing the platform is that we'd have to choose against Qt WebKit and Qt WebEngine, which is another crazy place that adds complexity.

It would also be possible to include a PyQt and QtForPython module in https://github.com/flathub/shared-modules. Maybe it's something worth considering.

If you're working on it now, you can copy the packaging I already did for QGIS:
https://github.com/flathub/org.qgis.qgis/blob/master/org.qgis.qgis.json
Comment 4 Erin Yuki Schlarb 2020-10-30 01:10:59 UTC
> I've thought about doing something about it but I don't think it's worth the effort at this point, especially considering how there's both PySide (Qt for Python now) and PyQt5.

Could you explain the difference between PySide and PyQt5 and why I've never seen a Python Qt application using the former (although it supposedly is the “official” binding)?

> It would surely be possible to have an extra org.kde.python.Platform kind of thing. Or an extension should be possible as well, haven't explored this approach, it would be welcome if someone did.

A separate platform would be overkill, but a runtime extension could be decent compromise there. Although I was secretly hoping to have it in the main platform image, as Python support in FDO/GNOME runtimes is available OOTB and as a Python programmer I of course love that. :-P

> The biggest problem with basing the platform is that we'd have to choose against Qt WebKit and Qt WebEngine, which is another crazy place that adds complexity.

I'm sorry, I don't understand what you mean with “basing” here? QtWebEngine/QtWebKit are not part of this and at least PyQt5 allows building the Python binding for QtWebEngine separately.

(OT: Regarding that, I had been privately wondering if wouldn't make sense to have these as runtime extensions [with their respective Python bindings].)