[PyQt] Massive inflation of .qrc files
Kyle Altendorf
sda at fstab.net
Thu Jan 4 14:51:49 GMT 2018
On 2018-01-03 09:31, Giuseppe Corbelli wrote:
> On 01/03/2018 01:19 PM, Phil Thompson wrote:
>>> On 01/03/2018 10:50 AM, Phil Thompson wrote:
>>>>>>> I've tried putting "splash.hide()" as late in the execution order
>>>>>>> as possible, but it's still fast. I'm not going to cheat and use
>>>>>>> "sleep()" :-)
>>>>>>>
>>>>>>> Does anyone have any insight? I can reduce the quality of the
>>>>>>> image (since it's shown so briefly), but if the resulting
>>>>>>> resource file is so large, there's not much point. And 97Kb is
>>>>>>> hardly a large image.
>>>>>> Using pyrcc is rarely a good idea.
>>>>>
>>>>> What would be your recommended approach to create a resource
>>>>> bundle?
>>>> pyrcc is the only way to create a resource file for Python. The
>>>> question is, why create a resource file at all?
>>>
>>> First thing that comes to mind is easier distribution in multiple
>>> formats (wheel, frozen...)
>>
>> I don't think it makes it any easier, see...
>>
>> http://pyqt.sourceforge.net/Docs/pyqtdeploy/pyrcc.html
>
> Sorry but I think I am missing something. Let's say I'm NOT using
> pyqtdeploy.
> I can deploy a wheel with the resource tree and use pkg_resources api.
> With pyinstaller I am forced to use resource-only eggs.
> Qt resources system + pyrcc is the only transparent solution I can
> think.
I may be missing something but I don't recall doing anything with eggs
for my PyInstaller deployed PyQt application. There's lots of silly
stuff I shouldn't be doing and I assume I'm not handling my data
correctly but I just tell PyInstaller about the files.
https://github.com/altendky/st/blob/2ef9b66edc44ba7ed96ebc5898bf8d3d7ae64adc/installer/pyinstaller.spec#L56
build at:
https://ci.appveyor.com/project/KyleAltendorf/st/build/v0.1.1.post91%20b207
Perhaps if I used whatever the proper Python mechanism is
(`include_package_data` and `MANIFEST.in`?) I wouldn't have to guide
PyInstaller. I tried it in a minimal PyQt example I made for IRC but I
haven't tried PyInstaller with that yet.
https://github.com/altendky/misc/tree/3c4c17abc4629e4fd4acdd8d4d8ca229ebd00b1f/experiments/basicpyqt5example
Cheers,
-kyle
More information about the PyQt
mailing list