Setuptools and easy_install for Python 3!
[Note: If you need Setuptools under Python 3 you can now use Distribute, which has Python 3 support.]
I spent some of my Yuletide vacation on porting setuptools to Python 3. The reason for that was simple: I want to use the Zope component architecture under Python 3. But the “official” way to develop on Zope foundations software is to use buildouts, and of course the component architecture modules have buildouts too. You can develop on them anyway, but not in the “correct” way. But before we can port buildout to Python 3 we must have setuptools, so I decided to try to port it.
So, said and done. It wasn’t easy, Phillip J Eby are way smarter than me, so there was a definite lack of comments in places where they would have helped me. Also, it needs to support versions as old as Python 2.3, so the code gets a bit hackish in some places. Also it does one thing that is tricky to port, it mixes binary and text data. This is because it sometimes doesn’t know if a file is text or not until it’s opened it and tried. But I got around most problems, and all the tests run, and you can now easy_install many packages under Python 3.
There are currently only a few packages for Python 3 that is packaged correctly with distutils and is installable with easy_install. Those are Durus – an object database, Evoque – a templating system, GChartWrapper – a wrapper for Google Chart, LEPL – a parser Library, lockfile – a platform-independent file locking module, maildirproc – a maildir processor, pep362 – function signature objects, pg8000-py3 – a PostgreSQL interface library, pseudomethod – call almost any function as a method, pyskein – a skein hash library, pyttk - a wrapper for Ttk, PyYAML – the name is self-explaining, qp – a web-application framework and finally qpy – xml/html content in functions (no, I don’t know what that means either).
The others aren’t correctly packaged with distutils for Python 3, so it’s not setuptools that’s buggy in those cases, as far as I can figure out.