Skip to content

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

@pyflakes-bot

Description

@pyflakes-bot

Original report by florent.x (@florentx?) on Launchpad:


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: kevinw/pyflakes#19

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions