Still need to specify the requires int the setup.py, as d2to1 does not seem to handle python_version dependant metadata

This commit is contained in:
Christophe de Vienne 2012-09-17 23:25:13 +02:00
parent 8d61bd983e
commit e295d01c16
2 changed files with 18 additions and 14 deletions

View File

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

View File

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