Search code examples
pythonpipsetuptoolspypi

Should I prepare eggs and zip in addition to tarball for PyPI?


I'm preparing my first package distribution for PyPI using setuptools etc. I've gotten the source distribution (.tar.gz) working well and now I'm wondering whether I should provide any other formats, like .zip and .egg.

On a random walk through PyPI I noticed some projects that provided eggs for different Python versions along with the source tarball. And I noticed one or two that provided the source distribution in .zip form.

What's the best practice for which formats to upload to PyPI? And do the various installation programs (easy_install, pip) have a preference for which one they use?


Solution

  • If you build no C-extensions, just ship the source tarball in tar.gz format. It can be installed on all platforms. A binary egg (installable by easy_install, not pip) is only neccessary if you build C-extensions and your software runs on Windows as people seldomly have a C-compiler on their machine.