Incorporate patch review on Flake8Command

* add a note about the setuptools command to README
* don't install the Flake8Command entry point without setuptools
* fix a bug in Flake8Command that might cause double checking
  of files in 'packages'
This commit is contained in:
Peter Teichman 2012-09-12 18:44:24 -04:00
parent 2e04e30d51
commit c6ac38cd70
3 changed files with 44 additions and 9 deletions

25
README
View file

@ -123,6 +123,31 @@ In order to use Flake8 inside a buildout, edit your buildout.cfg and add this::
entry-points =
flake8=flake8.run:main
setuptools integration
======================
If setuptools is available, Flake8 provides a command that checks the
Python files declared by your project. To use it, add flake8 to your
setup_requires::
setup(
name="project",
packages=["project"],
setup_requires=[
"flake8"
]
)
Running ``python setup.py flake8`` on the command line will check the
files listed in your ``py_modules`` and ``packages``. If any warnings
are found, the command will exit with an error code::
$ python setup.py flake8
Original projects
=================