PyQt6 and SIP v6 Snapshots Available
Bryce Beagle
bryce.beagle at gmail.com
Thu Sep 24 06:07:42 BST 2020
> > We've found using the resource files easier than using paths when
> > distributing with PyInstaller. Also the built-in translation support for
> > files is convenient
> I'm curious, why? Can't importlib_resources find the files relative to
> the module that it is bundled in?
Truth be told, I'd never heard of importlib_resources before, so maybe it's
something I should give a shot. We only use the .qrc file for images/svgs.
Do you have an example on how I could get Qt to load an image
from importlib_resources in a way that satisfies PyInstaller?
I also don't see this providing the translation features the .qrc system
provides. We could probably write a utility function that does this, but
that would take a bit effort.
> In fact, you're currently maintaining that precise list in your .qrc
> file instead of your .spec file, so I don't know how you can tolerate
> this maintenance burden.
We bundle more than the Qt client in with the PyInstaller build. It's nice
to have the Qt "stuff" stay in "Qt land" away from the other systems. This
is a fairly minor benefit though.
We used to have a utility function that would wrap around a path and
convert it to one using sys._MEIPASS, if running from the PyInstaller
environment; and ensure that the paths could be dynamically retrieved for
the .spec file. Maybe we'll go back to this system if pyrcc is removed.
> For future reference, if you use digests and therefore don't have an
> email to reply to, you can go to the website for the mailing list
Thanks for the assistance. Hopefully this works... Gmail didn't seem to
understand the mailto: format...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20200923/aae4bc3c/attachment.htm>
More information about the PyQt
mailing list