[Distutils] Python version in egg name

Eric Smith eric at trueblade.com
Thu Feb 3 16:34:44 CET 2011

On 02/03/2011 10:17 AM, Matt Chaput wrote:
> When I create an egg the Python version used to create the egg is encoded in the egg filename, e.g. Whoosh-1.6.0-py2.7.egg.
> Is this version number used to decide what egg a user gets from PyPI? I didn't think it was, but a user is seeming to indicate that he got different versions based on what version of Python he was using.
> Is there a way to set this value to "py2.5" as a configuration option, other than running setup.py using the Python 2.5 executable? Or not have it be part of the egg filename at all? I'm using Python 2.7 as my default Python install but I make sure that the code in my library is compatible with 2.5+. I've already someone think the library is only for a later version of Python because that's what I used to build the egg.
> Sorry if this is an old question, I looked around but didn't find any docs on the subject.

I use source distributions (python setup.py sdist) and then distribute 
the resulting .tar.gz file. Since it's a source (not binary) 
distribution, it can potentially run with any version of Python.

You see this a lot on PyPI, where the only thing uploaded is a .tar.gz 
file. See http://pypi.python.org/pypi/buildout.dumppickedversions/0.4, 
for example.


More information about the Distutils-SIG mailing list