diff --git a/setup.cfg b/setup.cfg index 420182e..7529089 100644 --- a/setup.cfg +++ b/setup.cfg @@ -28,24 +28,11 @@ classifier = Topic :: Internet :: WWW/HTTP :: WSGI Topic :: Software Development :: Libraries :: Python Modules -requires = - six - simplegeneric - [entry_points] wsme.protocols = restjson = wsme.protocols.restjson:RestJsonProtocol restxml = wsme.protocols.restxml:RestXmlProtocol -[metadata:python_version == '2.5'] -requires = WebOb <= 1.1.1 - -[metadata:python_version == '2.6' or python_version == '2.7'] -requires = WebOb - -[metadata:python_version != '2.5' and python_version != '2.6' and python_version != '2.7'] -requires = WebOb >= 1.2b3 - [files] packages = wsme diff --git a/setup.py b/setup.py index 7b26f9d..0773bbd 100644 --- a/setup.py +++ b/setup.py @@ -1,2 +1,19 @@ from setuptools import setup -setup(setup_requires=['d2to1'], d2to1=True) +import sys + +if sys.version_info[:2] <= (2, 5): + webob_version = ' <= 1.1.1' +elif sys.version_info[:2] >= (3, 0): + webob_version = ' >= 1.2.2' +else: + webob_version = '' + +setup( + setup_requires=['d2to1'], + install_requires=[ + 'six', + 'simplegeneric', + 'WebOb' + webob_version + ], + d2to1=True +)