diff options
| author | mrlabbe <devnull@localhost> | 2012-09-14 08:45:48 -0400 |
|---|---|---|
| committer | mrlabbe <devnull@localhost> | 2012-09-14 08:45:48 -0400 |
| commit | bb3dcbd321b95dc702ca7f193427b1898544ef86 (patch) | |
| tree | 5b419d564745d1c61ca7ae26c2bd7e2a3902e050 /setup.py | |
| parent | a312a1a08f52a1bcc5a9451291dac18fa8f3ceca (diff) | |
| parent | ea52243634383dfced9586648e553c03bf4e9824 (diff) | |
| download | flake8-bb3dcbd321b95dc702ca7f193427b1898544ef86.tar.gz | |
Add entry_points only with setuptools and command only w/o setuptools
Diffstat (limited to 'setup.py')
| -rwxr-xr-x | setup.py | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -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) |
