I am unsure if reusable django apps should use zip_safe=False
in setup.py.
What does break if a django app does not specify this?
EDIT The parameter zip_safe=False
was important until Django 1.7.11, but since Django 1.8 it can be omitted. Django 1.7 has not been supported in mainstream since December 2015 and this parameter can be usually removed from applications setup now.
It was used due to management/commands/*.py
and also data files like html templates, without relying on autodetection by setuptools. The opposite zip_safe=True
was a fatal problem with bdist_egg
command because management commands were not found in compressed installations.
The zip_safe autodetection by setuptools could be correct sometimes only by accident because the presence of management commands is not being recognized. A small change in your code can cause that your app will be compressed by some versions of installers. The parameter zip_safe has been removed even from Django setup.py and added again for safety in 2013.