On 7/11/2019 9:44 pm, Hartmut Goebel wrote:
Am 06.11.19 um 23:35 schrieb Brendan Simon (eTRIX):
Is there a way to get PyInstaller to only package the modules that
the app will use (other than commenting out code everywhere?)
pyinstaller --help is your friend.
I have been through all the documents and stackoverflow. I am using a
spec file and have been playing with filtering out various files before
producing the exe. e.g. removing all the ".npy" and ".npz" data files
that I don't need.
So running `pyinstaller --help` did help me focus back on
`--exclude-module`. This by itself doesn't do what I want, which is for
pyinstaller to not include modules it never sees (or what the app would
never see if run). Maybe that's not possible to do?
Anyway using `--exclude-module` at command line would mean I need
different scripts with different sets of command arguments (or one
script with some settings).
Thinking about it more, I could probably do it in the spec file too, by
importing those CONFIG attributes from the app and setting the
`excludes` list as required.
I'll give that a whirl.
Vielen Dank !
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to pyinstaller+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyinstaller/6fc2db98-9829-19bb-92cb-3173c0537286%40etrix.com.au.