setup.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import sys
  2. from os import path
  3. from codecs import open
  4. from setuptools import setup, find_packages
  5. from setuptools.command.test import test as TestCommand
  6. here = path.abspath(path.dirname(__file__))
  7. setup_requires = ['pytest']
  8. install_requires = ['aiohttp==0.16.5', 'aioredis==0.2.2']
  9. dev_requires = ['pyflakes', 'pep8', 'pylint', 'check-manifest',
  10. 'ipython', 'ipdb', 'sphinx', 'sphinx_rtd_theme',
  11. 'sphinxcontrib-napoleon']
  12. tests_require = ['pytest-cov', 'pytest-cache', 'pytest-timeout',
  13. 'pytest-asyncio', 'tox', 'redis']
  14. dev_requires.append(tests_require)
  15. # Get the long description
  16. with open(path.join(here, 'README.md'), encoding='utf-8') as f:
  17. long_description = f.read()
  18. class PyTest(TestCommand):
  19. def finalize_options(self):
  20. TestCommand.finalize_options(self)
  21. self.test_args = ['--strict', '--verbose', '--tb=long',
  22. '--cov', 'echo', '--cov-report',
  23. 'term-missing', 'tests']
  24. self.test_suite = True
  25. def run_tests(self):
  26. import pytest
  27. errno = pytest.main(self.test_args)
  28. sys.exit(errno)
  29. setup(
  30. name='echo',
  31. version='0.1.0',
  32. description='An Echo',
  33. long_description=long_description,
  34. url='https://github.com/wiliamsouza/echo',
  35. author='The Echo Authors',
  36. author_email='wiliamsouza83@gmail.com',
  37. classifiers=[
  38. 'Development Status :: 3 - Alpha',
  39. 'Intended Audience :: Developers',
  40. 'Topic :: Software Development :: Library',
  41. 'Programming Language :: Python :: 3',
  42. 'Programming Language :: Python :: 3.3',
  43. 'Programming Language :: Python :: 3.4',
  44. ],
  45. keywords='mock chaos monkey proxy callback',
  46. packages=find_packages(exclude=['docs', 'tests*']),
  47. setup_requires=setup_requires,
  48. install_requires=install_requires,
  49. tests_require=tests_require,
  50. extras_require={
  51. 'dev': dev_requires,
  52. 'test': tests_require,
  53. },
  54. cmdclass={'test': PyTest},
  55. )