diff --git a/setup.py b/setup.py index 9077cfd..4fabe99 100644 --- a/setup.py +++ b/setup.py @@ -1,22 +1,56 @@ +import codecs import os +import sys from setuptools import setup +version = '0.1.0' -with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: - README = readme.read() + +if sys.argv[-1] == 'publish': + os.system('python setup.py sdist upload') + os.system('python setup.py bdist_wheel upload') + print('You probably want to also tag the version now:') + print(' git tag -a %s -m "version %s"' % (version, version)) + print(' git push --tags') + sys.exit() + + +def read(*parts): + filename = os.path.join(os.path.dirname(__file__), *parts) + with codecs.open(filename, encoding='utf-8') as fp: + return fp.read() + + +install_requires = [ + 'Django>=1.6,<1.11', + 'celery>=3.0,<4.0', +] + + +test_requires = [ + 'coverage', + 'flake8', + 'mock', +] setup( name='django-post-request-task', - version='0.0.3', - description='A celery task class whose execution is delayed until after ' - 'the request finishes', + version=version, + description=( + 'A celery task class whose execution is delayed until after ' + 'the request finishes' + ), author='Mathieu Pillard', author_email='mpillard@mozilla.com', url='http://github.com/mozilla/django-post-request-task', license='MIT', - long_description=README, + long_description=read('README.rst'), packages=['post_request_task'], + install_requires=install_requires, + extras_require={ + 'tests': test_requires, + }, include_package_data=True, zip_safe=False, classifiers=[ @@ -28,6 +62,14 @@ setup( 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: Implementation :: PyPy', + 'Programming Language :: Python :: Implementation :: CPython', 'Topic :: Software Development :: Libraries :: Python Modules', ] )