Skip to content Skip to sidebar Skip to footer

Can I Create A Single Egg For Multiple Versions Of Python?

We have a local system which runs via a series of eggs. At the moment this means everyone must have a copy of Python 2.5 installed. Is it possible to create an egg which can be u

Solution 1:

Distribute the source tarball only; easy-install (or pip or buildout, or whatever package dependency manager / installer you use) will create an egg for you for the python version used to install it.

You only ever need to create eggs for distribution only for packages with C-extensions, and then only for Windows because most Windows system lack the tools needed to build the egg themselves.

Take a look at PyPI to see many examples of this, like the zope.interface page. Note that there are only .egg distributions there for python versions 2.4, 2.5 and 2.6 for Windows. Everything else just uses the .tar.gz tarball download and builds the .egg locally as needed.

You build a source tarball using the setup.py sdist command. Personally, I use jarn.mkrelease; it automates much of the process for you (like uploading the source distribution to a distribution server).

Post a Comment for "Can I Create A Single Egg For Multiple Versions Of Python?"