[Distutils] Python version numbers and jython, IronPython, PyPy, and ShedSkin (was: setuptools on jython)

Philip Jenvey pjenvey at groovie.org
Thu Jan 24 21:12:57 CET 2008


On Jan 22, 2008, at 8:35 AM, zooko wrote:

> If setuptools works on jython, what does it use for the "pyX.Y"  
> part of the egg names?
>
> And in the future hopefully IronPython, PyPy, and ShedSkin will  
> join the setuptools party.
>
> Does this revive our interest in supporting "100% Pure Python" eggs  
> that do not have an X.Y Python version number in their names?   
> (Since Python code without native extension modules is a lot more  
> likely to work on various versions of various implementations of  
> Python than Python code with native extension modules.)
>
> Or will jython, IronPython, PyPy, and ShedSkin specify some X.Y  
> version of CPython that they support?
>

You bring up a good point actually; setuptools bdist_egg hardcodes  
pyX.Y for egg filenames, so Jython currently creates eggs tagged as - 
py2.3.

This is going to be odd because eggs created from Jython don't  
contain .pyc files, instead they contain Jython $py.class files.

In the case of a zip_safe=False egg, easy_install actually re- 
compiles the eggs' .py files to byte code during their installation.  
So a zip_safe=False egg created from Jython would end up  
with .py, .pyc and $py.class when installed on CPython.

Though it looks like no byte compiling is done for zip_safe=True  
eggs. These eggs aren't extracted and recompiled, they're just  
installed as is. In that case an egg created from Jython would end up  
installed on CPython with no .pyc files.

CPython would fallback to using the .py file in that case, but that's  
not ideal. Is it worth it to use a different filename pattern than  
pyX.Y on Jython?

--
Philip Jenvey




More information about the Distutils-SIG mailing list