Is there a point to distributing .egg files?
June 26, 2008
So far I’ve found that distributing
.egg files is mostly useless:
- Source tarballs as created with the distutils/setuptools
sdistcommand are not only equivalent to eggs, they often contain more information (such as top-level
INSTALL.txtfiles). Also, not everybody has embraced
easy_installyet and a tarball is the least surprise to the old-school folks.
.eggfiles are marked with the Python version they were created with. So if you only upload an .egg file that was created with, say, Python 2.4, and you don’t provide a source tarball, Python 2.5 users will be out of luck trying to easy_install your package (even though it may perfectly work on Python 2.5).
- If the package contains C extensions, you pretty much can’t risk uploading an
.eggfile because it’ll contain binaries. With Linux and MacOSX this is unacceptable due to the various ways Python itself can be built on these platforms (and will therefore likely be incompatible with anything you’ve built). One notable exception is Windows which (thanks to its homogeneousness) makes it possible to distribute binaries w/o problems. Then again, because Windows users rarely have the right compiler installed, it pretty much requires you to distribute binaries.
So why are we still uploading
.egg files to PyPI? Isn’t it enough and even better to just upload the source tarball? (And a Windows binary egg only if the package contains C extensions.)