mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-29 10:36:53 +00:00
test_suite and tests_require only available when using setuptools
This commit is contained in:
parent
1492f618cb
commit
7be297cd1e
1 changed files with 6 additions and 2 deletions
8
setup.py
8
setup.py
|
|
@ -2,11 +2,16 @@ import sys
|
|||
|
||||
ispy3 = sys.version_info[0] == 3
|
||||
|
||||
kwargs = {}
|
||||
if ispy3:
|
||||
from distutils.core import setup # NOQA
|
||||
else:
|
||||
try:
|
||||
from setuptools import setup # NOQA
|
||||
kwargs = {
|
||||
'tests_require': ['nose'],
|
||||
'test_suite': 'nose.collector',
|
||||
}
|
||||
except ImportError:
|
||||
from distutils.core import setup # NOQA
|
||||
|
||||
|
|
@ -33,5 +38,4 @@ setup(
|
|||
"Topic :: Software Development",
|
||||
"Topic :: Utilities",
|
||||
],
|
||||
tests_require=['nose'],
|
||||
test_suite='nose.collector',)
|
||||
**kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue