Source

Python Keyring Lib / setup.py

Diff from to

File setup.py

         return False
     return True
 
+
+test_requirements = [
+    'pytest',
+]
+"dependencies for running tests"
+
+if sys.version_info < (2, 7) or (
+        sys.version_info >= (3, 0) and sys.version_info < (3, 1)):
+    # Require unittest2 for Python which doesn't contain the new unittest
+    # module (appears in Python 2.7 and Python 3.1)
+    test_requirements.append('unittest2')
+
 setup_params = dict(
     name = 'keyring',
-    version = "0.9.4",
+    version = "0.11",
     description = "Store and access your passwords safely.",
     url = "http://bitbucket.org/kang/python-keyring-lib",
     keywords = "keyring Keychain GnomeKeyring Kwallet password storage",
     author_email = "jobo.zh@gmail.com",
     maintainer = 'Jason R. Coombs',
     maintainer_email = 'jaraco@jaraco.com',
-    license="PSF",
+    license = "PSF",
     long_description = load('README') + load('CHANGES.txt'),
     classifiers = [
         "Development Status :: 5 - Production/Stable",
     platforms = ["Many"],
     packages = ['keyring', 'keyring.tests', 'keyring.util',
                 'keyring.backends'],
-    extras_require={'test': []},
+    extras_require = {'test': test_requirements},
+    tests_require = test_requirements,
+    setup_requires = [
+        'pytest-runner',
+    ],
 )
 
 
         use_2to3=True,
     )
 
-elif sys.version_info < (2, 7) or (
-    sys.version >= (3, 0) and sys.version < (3, 1)):
-    # Provide unittest2 for Python which doesn't contain the new unittest module
-    # (appears in Python 2.7 and Python 3.1)
-    setup_params.update(
-        tests_require=['unittest2'],
-    )
-    setup_params['extras_require']['test'].append('unittest2')
-
 
 if __name__ == '__main__':
     setup_mod.setup(**setup_params)