[edit: mention how the fix in Python 2.6.3 may have not belonged in 2.6.3 since it is a micro release]
Python 2.6.3 has a couple of bugs still lingering that warrant a brown bag 2.6.4 release (should be out before the end of the month). One of the "bugs", and the entire reason I am doing this blog post, involves distutils and setuptools. Turns out that for Python 2.6.3 a change was made to distutils that broke setuptools for building extension modules. While the change that broke setuptools is being viewed as improper for a micro release (code shouldn't break in a micro release unless it was really bad semantics being fixed), it did bring to my attention that a lot of people do not know about Distribute.
A problem is that setuptools is no longer maintained. Luckily there is already a solution to this predicament that the wider Python community might not be fully aware of. Tarek Ziadé forked setuptools and created Distribute, with its first release two months ago, explicitly to provide a library compatible with setuptools that is being actively maintained (and thus has bug fixes). Distribute is a drop-in replacement for setuptools, complete with being able to import it under the setuptools name so that everything will continue to work as if you had setuptools itself installed sans some bugs.
Because Distribute fixes bugs and is a backwards-compatible drop-in replacement I HIGHLY encourage people to change their installs of setuptools to Distribute. Everything will continue to work as Distribute installs itself under the setuptools name to maintain backwards-compatibility. Gentoo has even switched. Plus Distribute 0.6.3 supports Python 3.
So please, if you use setuptools then upgrade to Distribute.
Subscribe to:
Post Comments (Atom)
6 comments:
First of all I agree, we should all jump out of that.
As I commented on the original tweet the gentoo comment is misleading. That changeset means it was added to the masked archs (denoted by the ~) which in simple terms means "you are running your distro from trunk/tip/unstable" That said as usual gentoo is at the front predicting the future.
UHU-Linux (dev) switched too.
Wouldn't it have been smarter to take over setuptools developement instead of forking it, calling it something else but still having it install as setuptools? I think this will lead to much confusion.
Additionaly (unless I'm missing something here) virtualenv relys on the fact that it can fetch the newest version of setuptools from pypi under that name.
@UloPe That wasn't an option as PJE controls setuptools directly.
And as for virtualenv, Ian Bicking knows what is going on so if you are right about the requirement then I am sure it will get updated to use Distribute at some point.
There is now a setuptools update available which fixes quite a bit more than just this bug:
http://mail.python.org/pipermail/distutils-sig/2009-October/013822.html
My recommendation still stands for people to switch.
Post a Comment