-
Suppose I am writing a Python library containing non-Python files (e.g. json, dll, ...) which are crucial for functionality. When people using this library in their scripts want to bundle a script using PyInstaller, these data files are ignored by default, so the bundled application will crash. For being successful, they have to set PyInstaller flags specific to my library, like e.g. Is there something I can do so that everything works out nicely by default? See here for a concrete example. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
If you're talking about a specific package then you can write a hook for it then submit it to the hooks repository. If you're asking generally then no, PyInstaller can't magically detect which data files/binaries in packages are always necessary, only sometimes necessary or shouldn't have been packaged in the first place (test suites, examples, caches, settings, MSVC debugger files, header files, ...). |
Beta Was this translation helpful? Give feedback.
Instead of submitting the hook to hooks repository, you can also bundle it with your package and maintain it yourself.
See https://github.com/pyinstaller/hooksample