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

View file

@ -1,12 +1,14 @@
import sys
ispy3 = sys.version_info[0] == 3
issetuptools = False
if ispy3:
from distutils.core import setup # NOQA
else:
try:
from setuptools import setup # NOQA
issetuptools = True
except ImportError:
from distutils.core import setup # NOQA
@ -14,6 +16,10 @@ from flake8 import __version__
README = open('README').read()
entry_points = {}
if issetuptools:
entry_points["distutils.commands"] = ["flake8 = flake8.run:Flake8Command"]
setup(
name="flake8",
license="MIT",
@ -24,11 +30,7 @@ setup(
url="http://bitbucket.org/tarek/flake8",
packages=["flake8", "flake8.tests"],
scripts=["flake8/flake8"],
entry_points = {
"distutils.commands": [
"flake8 = flake8.run:Flake8Command",
],
},
entry_points=entry_points,
long_description=README,
classifiers=[
"Environment :: Console",