[Distutils] Distribute without 2to3

Vinay Sajip vinay_sajip at yahoo.co.uk
Tue Jun 21 15:13:35 CEST 2011

Lennart Regebro <regebro <at> gmail.com> writes:

> That's positive but...
> > Of course, I'm assuming that "python setup.py test" gives adequate coverage.
> It doesn't. Far from it, unfortunately.

That's not a good place to be, given that we'll be reliant on Distribute for a
while. Is there a more comprehensive test suite elsewhere? The stuff in the
distribute tests folder (not setuptools/tests) looked out-of-date and, in
places, broken.

This version was developed by running 2to3 on the Distribute code to see what
changes were needed, and then making the changes using a compatibility module
using an approach similar to Benjamin Peterson's six library. It is of course
possible that I've introduced some bugs during the conversion, but any that turn
up should be very easy to fix.

I'm using this Distribute version to try installing (via pysetup3) all allegedly
Py-3K packages on PyPI. So far, out of around 400 packages where I could find a
download URL for a source distribution, smoke testing revealed 190 apparent
successes, 70 failures and 140 which were untested because of failure to get the
tarball. A quick check of the failures shows that at least some of these are due
to failures in the tarballs themselves, e.g.

Markdown - setup.py is not Py3K compatible (contains print statements)
ast2src - hardcoded to require Python 3.1
Benchmarker - failed to recognize --single-version-externally-managed
cbucho - fails to import setuptools correctly in Py3K conditional code

Of course some potential pysetup3 issues are showing up too, e.g. "cannot detect
install method", which is one of the points of doing these tests.


Vinay Sajip

More information about the Distutils-SIG mailing list