With the addition of six to __init__.py the import of wsgi_intercept in setup.py to get version and long description information no longer works. Now we keep that information externally: * version is static in setup.py * the __doc__ from __init__.py is written to README.rst by a tox target, and that is loaded by setup.py This has an added benefit of keeping the github visible readme, the pypi info, and the main docs all in sync, at the cost of a little magic. The __doc__ rarely changes, so the magic isn't that bad. Note that the bug in this code (the use of bytestrings) is not yet fixed, but I'm making this change on that branch because it makes the test usable.
55 lines
1.4 KiB
Python
55 lines
1.4 KiB
Python
|
|
from setuptools import setup, find_packages
|
|
|
|
VERSION = '1.4.0'
|
|
README = open('README.rst').read()
|
|
|
|
CLASSIFIERS = """
|
|
Environment :: Web Environment
|
|
Intended Audience :: Developers
|
|
License :: OSI Approved :: MIT License
|
|
Operating System :: OS Independent
|
|
Programming Language :: Python :: 2
|
|
Programming Language :: Python :: 2.7
|
|
Programming Language :: Python :: 3
|
|
Programming Language :: Python :: 3.3
|
|
Programming Language :: Python :: 3.4
|
|
Programming Language :: Python :: 3.5
|
|
Topic :: Internet :: WWW/HTTP :: WSGI
|
|
Topic :: Software Development :: Testing
|
|
""".strip().splitlines()
|
|
|
|
|
|
META = {
|
|
'name': 'wsgi_intercept',
|
|
'version': VERSION,
|
|
'author': 'Titus Brown, Kumar McMillan, Chris Dent, Sasha Hart',
|
|
'author_email': 'cdent@peermore.com',
|
|
'description':
|
|
'wsgi_intercept installs a WSGI application in place of a '
|
|
'real URI for testing.',
|
|
# What will the name be?
|
|
'url': 'http://pypi.python.org/pypi/wsgi_intercept',
|
|
'long_description': README,
|
|
'license': 'MIT License',
|
|
'classifiers': CLASSIFIERS,
|
|
'packages': find_packages(),
|
|
'install_requires': [
|
|
'six',
|
|
],
|
|
'extras_require': {
|
|
'testing': [
|
|
'pytest>=2.4',
|
|
'httplib2',
|
|
'requests>=2.0.1',
|
|
'urllib3>=1.11.0',
|
|
],
|
|
'docs': [
|
|
'sphinx',
|
|
],
|
|
},
|
|
}
|
|
|
|
if __name__ == '__main__':
|
|
setup(**META)
|