How to debug why share/icons folder get included

20 views
Skip to first unread message

Patrik Dufresne (IKUS Soft)

unread,
Mar 22, 2024, 10:55:37 AMMar 22
to PyInstaller
Hello,

I'm working on a new application that make use of kivy & kivymd. I'm running into issue with the packaging because Pyinstaller include the content of my "share" folder on Linux.

On Linux, the content of my /usr/share folder get copied into the build which make the final build what too big.

I'm not trying to understand why the folder get collected by PyInstaller and how to identify which package required that folder and why it get include. I tried enabling debug log without any success.

My Question:
What is the best way to identify why a file is included by PyInstaller ?

I'm using PyInstaller 5.13.2 (I tried with Pyinstaller 6.x.x and I have the same problem)

Thanks

bwoodsend

unread,
Mar 23, 2024, 8:59:21 AMMar 23
to PyInstaller

Hmm, it’s expected that knowing where a file came from (which you can find in the various build/*/*.toc files) is enough to answer that question. Failing that, I guess you could look at the INFO: Loading module hook 'hook-xxx.py' from '.../PyInstaller/hooks and read those hook files to see if you can find anything that looks like it’s trying to add /usr/shared/* directories to datas.

Most likely though, it’ll be Gtk related. That requires an unpleasant amount of stuff to function.

Patrik Dufresne

unread,
Mar 25, 2024, 7:32:37 AMMar 25
to pyins...@googlegroups.com
Hello bwoodsend,

Thanks for your guidance. Indeed it seems to be related to GTK. I made a couple of tests in different environments by adding and removing libraries. I thought it was related to Kivy at first, but indeed it's related to Gtk. It's probably a hook that gathers all those files.

Since I only use GTK to open a message dialog, I hope it's possible to reduce the number of files. Otherwise, I might look into a different solution to open those message dialogs on Linux.


Le sam. 23 mars 2024, à 08 h 59, bwoodsend <bwoo...@gmail.com> a écrit :

Hmm, it’s expected that knowing where a file came from (which you can find in the various build/*/*.toc files) is enough to answer that question. Failing that, I guess you could look at the INFO: Loading module hook 'hook-xxx.py' from '.../PyInstaller/hooks and read those hook files to see if you can find anything that looks like it’s trying to add /usr/shared/* directories to datas.

Most likely though, it’ll be Gtk related. That requires an unpleasant amount of stuff to function.

--
You received this message because you are subscribed to a topic in the Google Groups "PyInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyinstaller/DCvSYvIusRU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/0d33dcda-2ad5-487d-a524-b5757c9c09dan%40googlegroups.com.


--
IKUS Software

bwoodsend

unread,
Mar 25, 2024, 3:41:55 PMMar 25
to PyInstaller

There are some special options for excluding the bits of Gtk that you don’t want. Although I’m surprised that you can’t use Kivy to create the message dialogues.

Patrik Dufresne

unread,
Mar 27, 2024, 7:08:25 AMMar 27
to pyins...@googlegroups.com
Hello Bwoodsend

Thanks for pointing to the documentation. I didn't even know it was possible to configure hooks. But either way, I will change my strategy to make use of an alternate way to display message dialog. Kivy does support the creation of message dialog and I'm using it as a fallback in case the native API is not available. That is probably what I will do on Linux.

Thanks for your help.

Le lun. 25 mars 2024, à 15 h 42, bwoodsend <bwoo...@gmail.com> a écrit :

There are some special options for excluding the bits of Gtk that you don’t want. Although I’m surprised that you can’t use Kivy to create the message dialogues.

--
You received this message because you are subscribed to a topic in the Google Groups "PyInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyinstaller/DCvSYvIusRU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pyinstaller...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages