I have a Python app which includes non-Python data files in some of its subpackages. I’ve been using the include_package_data option in my setup.py to include all these files automatically when making distributions. It works well.
Now I’m starting to use py2exe. I expected it to see that I have include_package_data=True and to include all the files. But it doesn’t. It puts only my Python files in the library.zip, so my app doesn’t work.
How do I make py2exe include my data files?
I ended up solving it by giving py2exe the option
skip_archive=True. This caused it to put the Python files not inlibrary.zipbut simply as plain files. Then I useddata_filesto put the data files right inside the Python packages.