support "setup.py test" and "setup.py develop"

Bug #1097379 reported by Florent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pyflakes
Fix Released
Low
Unassigned

Bug Description

The setup.py could optionally use distribute/setuptools if it is available in the path.

The library distribute (or setuptools) is very common in the Python ecosystem, and many tools depend on them, like "pip install", "virtualenv", "zc.buildout", ...
Of course there's some criticism about these tools, but they exist, they are compatible, and they work fine for a lot of developers.
They fill a use case as explained below.

The benefit of using distribute/setuptools is the additional verbs which are available, like:

  $ python setup.py test

This allows to run the tests, and it takes care of installing the 'test_requires' dependencies without other action. Anyone can run the tests without any assumption about the test framework, and without digging through the source code to know which libraries are required (nose, py.test, twisted.trial, unittest, etc...).
This particular use case is not supported by the distutils library.

Another verb which is widely used but not supported by distutils:

  $ python setup.py develop

And the best is that it is fully optional.
When the distribute/setuptools package is not installed, it imports 'setup' from distutils and it behaves exactly the same as before.

For the record, there are some users which already suggested this change: https://github.com/kevinw/pyflakes/pull/19

Florent (florent.x)
summary: - supports "setup.py test" and "setup.py develop"
+ support "setup.py test" and "setup.py develop"
Florent (florent.x)
Changed in pyflakes:
status: New → Confirmed
importance: Undecided → Low
status: Confirmed → Fix Committed
Florent (florent.x)
Changed in pyflakes:
milestone: none → 0.6.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.