emorphus
emorphus

Reputation: 560

excluding files in Pyinstaller

In the spec file created by Pyinstaller when compiling i have added

excludes=["mfc90u.dll", "mfc90.dll"],

but after compiling these two files can be found in the compiled directory. BUT when I add the line

excludes=["FixTk", "tcl", "tk", "tkinter", "Tkinter"],

it works perfectly. The mfc90u.dll and mfc90.dll causes an error when converting the files to the Windows AppX format and I would like to exclude them. How can i prevent the files and folders i want from being added TO THE compilation?

Upvotes: 2

Views: 1615

Answers (2)

user3999721
user3999721

Reputation:

any files and folders that are not necessary can be removed.

first with directory mode, manually you can explore deleting doubtful huge files and testing for its working.

then update spec to exclude not necessary datas or binaries

more details on:
https://github.com/pyinstaller/pyinstaller/discussions/6126

Upvotes: 0

johnlu
johnlu

Reputation: 61

This works for me ('a' is the Analysis object):

a.binaries = TOC([x for x in a.binaries if x[0] not in excludes])

Upvotes: 1

Related Questions