Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Including a directory using Pyinstaller

All of the documentation for Pyinstaller talks about including individual files. Is it possible to include a directory, or should I write a function to create the include array by traversing my include directory?

like image 894
Simon Knight Avatar asked Jul 04 '12 04:07

Simon Knight


People also ask

How do I add a folder to PyInstaller?

At least for pyinstaller 4.2 the datas field need to be added as a tuple. If you want to add multiple folders it needs to be something like: ... datas = [('test/dir', 'test/dir'),('test2/dir', 'test2/dir')] ...

Does PyInstaller include libraries?

PyInstaller does not include libraries that should exist in any installation of this OS. For example in GNU/Linux, it does not bundle any file from /lib or /usr/lib , assuming these will be found in every system.

Does PyInstaller include imports?

python - PyInstaller does not include imports - Stack Overflow. Stack Overflow for Teams – Start collaborating and sharing organizational knowledge.


1 Answers

I'm suprised that no one mentioned the official supported option using Tree():

https://stackoverflow.com/a/20677118/2230844

https://pyinstaller.readthedocs.io/en/stable/advanced-topics.html#the-toc-and-tree-classes

like image 158
denfromufa Avatar answered Sep 23 '22 02:09

denfromufa