If I read this correctly, then the egg format is something one should not use anymore. Instead, one should use the wheels format. Others seem to read this the same way.
With this assumption: Is zip_safe
relevant for any other distribution format than egg?
According to this:
A boolean (True or False) flag specifying whether the project can be safely installed and run from a zip file. If this argument is not supplied, the bdist_egg command will have to analyze all of your project’s contents for possible problems each time it builds an egg.
Setuptools does not mention wheels. So I guess it is not relevant for wheels. So if I don't build eggs, I don't need this?
But then, if I install packages with pip install -e .
, it seems as if it creates an egg file (well, an [package name].egg-info
)... so maybe egg isn't outdated, even with Python 3.8?
I believe the section "Is it possible to import Python code directly from a wheel file?" from PEP 427 could answer your question. In short, it is technically possible to leave the packages zipped, but there are advantages in installing them unzipped: easier access to metadata and prevention against some corner cases (can't execute binaries in a zip file). So that would explain why the zip_safe
is not relevant anymore in general and for wheels in particular.
Nowadays, I believe eggs are only used in some rare specific cases. One of them is the setuptools develop mode or pip editable mode, in order to take advantage of the egg link feature.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With