Python Setuptools, Adding Non Code Files to a Package.
Often python packages need to depend on files which are not python source (.py) files such as images, data tables, documentation, and etc. Those files need special treatment in order for setuptools to handle them correctly.
The mechanism that provides this is the MANIFEST.in file. This is relatively quite simple. MANIFEST.in is really just a list of relative file paths specifying files or globs to be included while packaging.
include README.rst
include docs/*.txt
include funniest/data.json
In order for these files to be copied at install time to the package’s folder inside site-packages, you’ll need to supply include_package_data=True to the setup() function.
zip_safe Flag
Python packages may be run directly from a zip file and setuptools can install your project as a zipfile or a directory, and its default choice is determined by the project’s zip_safe flag.
Once you included non-code files sometimes may be you might want to set zip_safe=False because not all packages, however, are capable of running in compressed form, because they may expect to be able to access either source code or data files as normal operating system files.