mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-11 07:14:18 +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
|
ispy3 = sys.version_info[0] == 3
|
||||||
|
|
||||||
|
kwargs = {}
|
||||||
if ispy3:
|
if ispy3:
|
||||||
from distutils.core import setup # NOQA
|
from distutils.core import setup # NOQA
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
from setuptools import setup # NOQA
|
from setuptools import setup # NOQA
|
||||||
|
kwargs = {
|
||||||
|
'tests_require': ['nose'],
|
||||||
|
'test_suite': 'nose.collector',
|
||||||
|
}
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from distutils.core import setup # NOQA
|
from distutils.core import setup # NOQA
|
||||||
|
|
||||||
|
|
@ -33,5 +38,4 @@ setup(
|
||||||
"Topic :: Software Development",
|
"Topic :: Software Development",
|
||||||
"Topic :: Utilities",
|
"Topic :: Utilities",
|
||||||
],
|
],
|
||||||
tests_require=['nose'],
|
**kwargs)
|
||||||
test_suite='nose.collector',)
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue