Greetings, everyone.
I am making a GUI application on Linux using PyGObject. I tried packaging it using PyInstaller, but the size of produced distribution was enormous: ~800 MB in one-dir mode, and 200+ MB in one-file mode, which takes ~4.5 seconds to unpack and launch on my machine.
I soon discovered that most of that volume is due to /usr/share/icons, /usr/share/themes and some other directories being copied into the distribution in whole. The icon packs alone take up around 600 MB on my system. I guess, PyInstaller thinks they are required by Gtk, and they may be, but not in my project. I do use a few icons in the GUI, but I supply the icon files myself, so there should be no need for any system icons, let alone all the icons in the world.
Icon packs are the main concern, but there is also a lot of other files from /usr/share which get copied and which I suspect are unneeded in my case.
I've looked through the documentation, and could not find any info on excluding data files, only adding. I am new to PyInstaller (and Python in general, for that matter), and so far I cannot find any way to not collect all those files. I tried using the 'excludes' argument to the Analyzer, but either I am not using it correctly, or it is meant for something else.
It would be great if there was some way to just blacklist certain locations to prevent PyInstaller from collecting anything from them.
The only way I can currently see for dealing with this problem is to simply delete those directories from the ready distribution, but then I'd have to stick with the one-dir mode, which is not ideal.
I will keep digging, but any help would be much appreciated.