summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authormrlabbe <devnull@localhost>2012-09-14 08:45:48 -0400
committermrlabbe <devnull@localhost>2012-09-14 08:45:48 -0400
commitbb3dcbd321b95dc702ca7f193427b1898544ef86 (patch)
tree5b419d564745d1c61ca7ae26c2bd7e2a3902e050 /setup.py
parenta312a1a08f52a1bcc5a9451291dac18fa8f3ceca (diff)
parentea52243634383dfced9586648e553c03bf4e9824 (diff)
downloadflake8-bb3dcbd321b95dc702ca7f193427b1898544ef86.tar.gz
Add entry_points only with setuptools and command only w/o setuptools
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/setup.py b/setup.py
index 1808838..c0528e1 100755
--- a/setup.py
+++ b/setup.py
@@ -1,14 +1,24 @@
-import sys
+import sys
ispy3 = sys.version_info[0] == 3
+kwargs = {}
+scripts = ["flake8/flake8"]
if ispy3:
from distutils.core import setup # NOQA
else:
try:
from setuptools import setup # NOQA
+ kwargs = {
+ 'tests_require': ['nose'],
+ 'test_suite': 'nose.collector',
+ 'entry_points': {
+ 'console_scripts': ['flake8 = flake8.run:main']
+ },
+ }
except ImportError:
from distutils.core import setup # NOQA
+ scripts.append("scripts/flake8.cmd")
from flake8 import __version__
@@ -23,7 +33,7 @@ setup(
author_email="tarek@ziade.org",
url="http://bitbucket.org/tarek/flake8",
packages=["flake8", "flake8.tests"],
- scripts=["flake8/flake8", "scripts/flake8.cmd"],
+ scripts=scripts,
long_description=README,
classifiers=[
"Environment :: Console",
@@ -33,7 +43,4 @@ setup(
"Topic :: Software Development",
"Topic :: Utilities",
],
- entry_points={
- 'console_scripts': ['flake8 = flake8.run:main']
- },
- )
+ **kwargs)