[PyQt] Missing application resources when run in one Linux distro but not another

Damon Lynch damonlynch at gmail.com
Sun Mar 22 17:12:30 GMT 2020


On Sun, Mar 22, 2020 at 12:23 PM Eli Schwartz <eschwartz at archlinux.org> wrote:

> Is this actually your problem, by the way? Or do you only need
> ${qtlibdir}/plugins/imageformats/libqsvg.so in order to support QImages
> in the svg format, which would be indirectly satisfied by
> python3-pyqt5.qtsvg simply due to depending on libqt5svg5?
>
> It's more likely that packages which explicitly make use of svg resource
> files need to depend on the right image plugin to handle those files,
> totally unrelated to python.
>

You're absolutely right Eli, thank you! (And thanks also to Maurizio
and David). The package libqt5svg5 needed to be installed, not
python3-pyqt5.qtsvg. I got completely bamboozled by the two of them.
My code does not import the PyQt5.QtSvg module.

Pop!_OS does not install libqt5svg5 when python3-pyqt5 is installed.
Debian does, it seems (or something else depends on it in a default
Debian desktop install).

I have to say packaging up applications for distribution is far from
easy. In fact I'd say it's one of the most difficult aspects of
developing and certainly maintaining a project, if not the most
difficult. Dealing with the intricacies of setuptools / distutils,
pip, package metadata, free desktop specs, and distro package
databases -- there is an awful lot to learn, and so much that can go
wrong.

Only yesterday, after more than a decade, did I realize that the
.desktop file must have a StartupWMClass property if Gnome Shell or
some other desktop environments are to display the launcher correctly
(i.e associate the launcher with the running instance of the program).
And on a related note, only yesterday did I realize that the Unity
LauncherEntry API does not require Unity or Ubuntu's spin of Gnome.
This API is really useful because KDE and some popular Gnome Shell
extensions (including Ubuntu's) use this API to show badge counts and
progress bars on the application launcher, similar to of the same as
how the old Ubuntu Unity desktop did it (and reminiscent of Windows
too, of course). For plenty of programs, these features are quite
handy. But they are underused. [1]

Only today did I realize that although the official Appstream docs
talk about the internationalization of screenshots in the metainfo.xml
file, Gnome Software does not know about it and will display all the
screenshots regardless of locale. [2][3]

[1] https://github.com/home-sweet-gnome/dash-to-panel/issues/98
[2] https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html
[3] https://gitlab.gnome.org/GNOME/gnome-software/issues/955


-- 
http://www.damonlynch.net


More information about the PyQt mailing list