[Distutils] Python version in egg name

Glyph Lefkowitz glyph at twistedmatrix.com
Sat Feb 5 20:59:04 CET 2011


On Feb 2, 2011, at 2:49 PM, Matt Chaput wrote:

> 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.

If you're building eggs, they're only going to be compatible with a single version of Python.  Bytecode isn't compatible across multiple versions.  If your module is pure python, you should just set up a linux VM old enough to have the Python versions you want or something :).

So you might be able to hack something together that would cause a broken egg to be installed for users of other versions of python, but you won't be able to fix this issue, no.

Otherwise, you can distribute some other format, like an sdist tarball, which has no pycs in it.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20110205/70eb075b/attachment.html>


More information about the Distutils-SIG mailing list