diff --git a/.hgignore b/.hgignore index 7962a47..a2a5853 100644 --- a/.hgignore +++ b/.hgignore @@ -19,4 +19,4 @@ syntax: regexp ^dist ^doc/_build - +^d2to1-.*\.egg diff --git a/setup.cfg b/setup.cfg index fabcb6b..420182e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,62 @@ +[metadata] +name = WSME +version = 0.4b1 + +author = "Christophe de Vienne" +author-email = "python-wsme@googlegroups.com" + +summary = Web Services Made Easy makes it easy to + implement multi-protocol webservices. + +description-file = README.rst + +url = http://bitbucket.org/cdevienne/wsme + +license = MIT + +classifier = + Development Status :: 3 - Alpha + Operating System :: OS Independent + Programming Language :: Python + Programming Language :: Python :: 2.5 + Programming Language :: Python :: 2.6 + Programming Language :: Python :: 2.7 + Programming Language :: Python :: 3.2 + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: Implementation :: PyPy + License :: OSI Approved :: MIT License + 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 + wsme.protocols + wsme.tests + +extra_files = + setup.py + README.rst + + [egg_info] tag_build = dev tag_date = true diff --git a/setup.py b/setup.py index 3e64039..7b26f9d 100644 --- a/setup.py +++ b/setup.py @@ -1,57 +1,2 @@ -import os -import sys - from setuptools import setup - -filename = os.path.join('wsme', 'release.py') -release = {} -exec(compile(open(filename).read(), filename, 'exec'), release) - -long_description = open("README.rst", 'rt').read() - -if sys.version_info[:2] <= (2, 5): - webob_version = '<=1.1.1' -elif sys.version_info[:2] >= (3, 0): - webob_version = '>=1.2b3' -else: - webob_version = '' - -setup( - name=release['name'], - version=release['version'], - description=release['description'], - long_description=long_description, - author=release['author'], - author_email=release['email'], - url=release['url'], - packages=['wsme', 'wsme.protocols', 'wsme.tests'], - package_data={ - 'wsme.protocols': ['templates/*.html'], - }, - install_requires=[ - 'six', - 'simplegeneric', - 'webob' + webob_version - ], - classifiers=[ - 'Development Status :: 3 - Alpha', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 2.5', - 'Programming Language :: Python :: 2.6', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.2', - 'Programming Language :: Python :: Implementation :: CPython', - 'Programming Language :: Python :: Implementation :: PyPy', - 'License :: OSI Approved :: MIT License', - 'Topic :: Internet :: WWW/HTTP :: WSGI', - 'Topic :: Software Development :: Libraries :: Python Modules', - ], - - entry_points={ - 'wsme.protocols': [ - 'restjson = wsme.protocols.restjson:RestJsonProtocol', - 'restxml = wsme.protocols.restxml:RestXmlProtocol', - ] - }, -) +setup(setup_requires=['d2to1'], d2to1=True) diff --git a/wsme/release.py b/wsme/release.py deleted file mode 100644 index c7c72c5..0000000 --- a/wsme/release.py +++ /dev/null @@ -1,12 +0,0 @@ -name = "WSME" -version = "0.4b1" - -description = """Web Services Made Easy makes it easy to \ -implement multi-protocol webservices.""" - -author = "Christophe de Vienne" -email = "python-wsme@googlegroups.com" - -url = "http://bitbucket.org/cdevienne/wsme" - -license = "MIT"