From 77df9ea28d403f0065b68f85f8f2c7577822929f Mon Sep 17 00:00:00 2001 From: Tom Hunger Date: Fri, 12 Dec 2014 17:39:58 +0000 Subject: [PATCH] Remove unnecessary dependencies. cherrypy is only used for the example so keeping it in the development mode should be fine. argparse and importlib are shipped with python2.7+ --- setup.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 91cf04a..f8fa661 100755 --- a/setup.py +++ b/setup.py @@ -35,6 +35,11 @@ class PyTest(TestCommand): errno = pytest.main(self.test_args) sys.exit(errno) +# Python 2.7 and later ship with importlib and argparse +if sys.version_info.major == 2 and sys.version_info.minor == 6: + extra_install_requires = ["importlib", "argparse"] +else: + extra_install_requires = [] setup( name="oic", @@ -51,10 +56,13 @@ setup( "License :: OSI Approved :: Apache Software License", "Topic :: Software Development :: Libraries :: Python " "Modules"], - install_requires=['requests', "pycrypto>=2.6.1", "cherrypy==3.2.4", - "mako", "pyjwkest>=0.5.1", "beaker", "alabaster", - "importlib", "argparse", "pyOpenSSL"], + extras_require={ + 'develop': ["cherrypy==3.2.4"], + }, + install_requires=[ + "requests", "pycrypto>=2.6.1", "pyjwkest>=0.5.1", + "mako", "beaker", "alabaster", "pyOpenSSL"] + extra_install_requires, tests_require=['pytest'], zip_safe=False, cmdclass={'test': PyTest}, -) \ No newline at end of file +)