test_suite and tests_require only available when using setuptools

This commit is contained in:
Mathieu Agopian 2012-09-12 11:39:36 +02:00
parent 1492f618cb
commit 7be297cd1e

View file

@ -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)