Commits

Mathieu Agopian committed 3df466f

test_suite and tests_require only available when using setuptools

  • Participants
  • Parent commits 32a772d
  • Branches test-suite-in-setup-py

Comments (0)

Files changed (1)

 
 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
 
         "Topic :: Software Development",
         "Topic :: Utilities",
         ],
-    tests_require=['nose'],
-    test_suite='nose.collector',)
+    **kwargs)