Get rid of and

Issue #202 resolved
Chris McDonough
created an issue

I'd suggest getting rid of dependency on and

If someone has an older setup of Python 3.2.3 that has eg. distribute 0.6.24 installed:

[chrism@perspire Python-3.2.3]$ bin/easy_install coverage
Searching for coverage
Best match: coverage 3.5.3
Processing coverage-3.5.3.tar.gz
Running coverage-3.5.3/ -q bdist_egg --dist-dir /tmp/easy_install-s8o1kl/coverage-3.5.3/egg-dist-tmp-hyw4pc
The required version of distribute (>=0.6.27) is not available, and can't be installed while this script is running. Please install a more recent version first, using 'easy_install -U distribute'.

(Currently using distribute 0.6.24     
error: Setup script exited with 2

This is a bogus error, because that version of distribute would work just fine to install that version of coverage if were not used.

This isn't a terrible hardship interactively but it was a real problem for me while running tox, which creates a virtualenv under the hood using whatever version of virtualenv is installed. Since older virtualenvs ship with older distribute versions, there was be about a half hour of headscratching when this error occured during a tox run. The solution was to upgrade virtualenv to brandnewshiny, but this isn't always possible or desirable.

The reason to get rid of is because it will have similar problems when executed and the version of setuptools/distribute installed doesn't match its worldview. (Grep for "was_imported" in

And of course the other reason is that you don't want to continually need to bump the versions of these files over time; it's a losing game.

Instead of relying on these files and "use_setuptools" in the, I'd either a) document that folks need either setuptools or distribute to install coverage or b) rely only on distutils.

Comments (4)

  1. Ned Batchelder repo owner

    I would love to use only distutils. If you could help with that, or just point me to a project that provides a command-line script without needing setuptools etc, that would be great.

    As a last resort, I could use setuptools without an auto-installation, but I'd like to understand my options for doing without it first.

  2. Daniel Holth

    I think the right thing to do is to assume setuptools is available without including the bootstrap in Everyone has setuptools, and if they don't, they do not want you to install it for them.

    p.s. pip will run with setuptools, even if you do not import it.

  3. Log in to comment