#13587 closed Cleanup/optimization (fixed)
Set zip_safe = False in setup.py
Reported by: | Tim Graham | Owned by: | nobody |
---|---|---|---|
Component: | Packaging | Version: | dev |
Severity: | Normal | Keywords: | setup.py |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Django isn't zip_safe:
django.contrib.gis.tests.geogapp.tests: module references __file__ django.contrib.gis.tests.geo3d.tests: module references __file__ django.contrib.gis.tests.layermap.tests: module references __file__ django.contrib.gis.gdal.tests.test_ds: module references __file__ django.contrib.admindocs.views: module references __file__ django.contrib.auth.tests.views: module references __file__ django.utils.autoreload: module references __file__ django.utils.module_loading: module references __path__ django.utils.version: module references __path__ django.utils.translation.trans_real: module references __file__ django.test._doctest: module references __file__ django.test._doctest: module MAY be using inspect.getsourcefile django.test.simple: module references __file__ django.core.management.sql: module references __file__ django.core.management.base: module references __path__ django.core.management.__init__: module references __file__ django.core.management.__init__: module references __path__ django.core.management.commands.loaddata: module references __file__ django.core.management.commands.loaddata: module references __path__ django.core.management.commands.makemessages: module references __file__ django.core.servers.basehttp: module references __path__ django.views.i18n: module references __file__ django.db.utils: module references __file__ django.db.models.loading: module references __file__ django.conf.__init__: module references __file__ django.conf.project_template.manage: module references __file__ django.template.loaders.app_directories: module references __file__
Any reason not to set the zip_safe flag in setup.py? This was addressed in #538 but the flag was lost at some point when setup.py was refactored.
Attachments (1)
Change History (4)
by , 15 years ago
Attachment: | zip_safe.diff added |
---|
comment:1 by , 14 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 13 years ago
Easy pickings: | unset |
---|---|
Severity: | → Normal |
Type: | → Uncategorized |
UI/UX: | unset |
the zip_egg_fixed patch for #14087 can fix this.
comment:3 by , 9 years ago
Component: | Core (Other) → Packaging |
---|---|
Resolution: | invalid → fixed |
Type: | Uncategorized → Cleanup/optimization |
Django has since switched to setuptools in 1.7 and zip_safe=False
was added as part of that change: 66f546b90624297858b0f958abbe5c2b3e8bdffb.
Note:
See TracTickets
for help on using tickets.
Yes, there is a reason - Django uses distutils, not setuptools. zip_safe is a setuptools option; if you apply the provided patch and run
python setup.py install
, you get the warning {{{UserWarning: Unknown distribution option: 'zip_safe'}}}