setup.py 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. #!/usr/bin/env python
  2. """
  3. Sentry
  4. ======
  5. Sentry is a realtime event logging and aggregation platform. It specializes
  6. in monitoring errors and extracting all the information needed to do a proper
  7. post-mortem without any of the hassle of the standard user feedback loop.
  8. Sentry is a Server
  9. ------------------
  10. The Sentry package, at its core, is just a simple server and web UI. It will
  11. handle authentication clients (such as `Raven <https://github.com/getsentry/raven-python>`_)
  12. and all of the logic behind storage and aggregation.
  13. That said, Sentry is not limited to Python. The primary implementation is in
  14. Python, but it contains a full API for sending events from any language, in
  15. any application.
  16. :copyright: (c) 2011-2014 by the Sentry Team, see AUTHORS for more details.
  17. :license: BSD, see LICENSE for more details.
  18. """
  19. from setuptools import setup, find_packages
  20. from setuptools.command.test import test as TestCommand
  21. import sys
  22. # Hack to prevent stupid "TypeError: 'NoneType' object is not callable" error
  23. # in multiprocessing/util.py _exit_function when running `python
  24. # setup.py test` (see
  25. # http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
  26. for m in ('multiprocessing', 'billiard'):
  27. try:
  28. __import__(m)
  29. except ImportError:
  30. pass
  31. setup_requires = []
  32. if 'test' in sys.argv:
  33. setup_requires.append('pytest')
  34. dev_requires = [
  35. 'flake8>=2.0,<2.1',
  36. ]
  37. tests_require = [
  38. 'casscache',
  39. 'cqlsh',
  40. 'elasticsearch',
  41. 'exam>=0.5.1',
  42. 'eventlet',
  43. 'httpretty',
  44. 'pytest',
  45. 'pytest-cov>=1.4',
  46. 'pytest-django',
  47. 'pytest-timeout',
  48. 'python-coveralls',
  49. 'mock>=0.8.0',
  50. 'riak',
  51. 'unittest2',
  52. ]
  53. install_requires = [
  54. 'BeautifulSoup>=3.2.1,<3.3.0',
  55. 'celery>=3.0.15,<3.1.0',
  56. 'cssutils>=0.9.9,<0.10.0',
  57. 'Django>=1.5.8,<1.6',
  58. 'django-bitfield>=1.7.0,<1.8.0',
  59. 'django-celery>=3.0.11,<3.1.0',
  60. 'django-crispy-forms>=1.2.3,<1.3.0',
  61. 'django-paging>=0.2.5,<0.3.0',
  62. 'django-picklefield>=0.3.0,<0.4.0',
  63. 'django-recaptcha>=1.0.0,<1.1.0',
  64. 'django-social-auth>=0.7.28,<0.8.0',
  65. 'django-static-compiler>=0.3.0,<0.4.0',
  66. 'django-statsd-mozilla>=0.3.8.0,<0.3.9.0',
  67. 'django-sudo>=1.1.0,<1.2.0',
  68. 'django-templatetag-sugar>=0.1.0',
  69. 'djangorestframework>=2.3.8,<2.4.0',
  70. 'email-reply-parser>=0.2.0,<0.3.0',
  71. 'enum34>=0.9.18,<0.10.0',
  72. 'gunicorn>=0.17.2,<0.18.0',
  73. 'ipaddr>=2.1.11,<2.2.0',
  74. 'logan>=0.5.8.2,<0.6.0',
  75. 'nydus>=0.10.7,<0.11.0',
  76. 'Pygments>=1.6.0,<1.7.0',
  77. 'python-dateutil>=1.5.0,<2.0.0',
  78. 'python-memcached>=1.53,<2.0.0',
  79. 'raven>=5.0.0',
  80. 'redis>=2.7.0,<2.9.0',
  81. 'simplejson>=3.1.0,<3.4.0',
  82. 'six>=1.6.0,<1.7.0',
  83. 'setproctitle>=1.1.7,<1.2.0',
  84. 'South==0.8.2',
  85. 'toronado>=0.0.4,<0.1.0',
  86. 'ua-parser>=0.3.5',
  87. 'urllib3>=1.7.1,<1.8.0',
  88. ]
  89. postgres_requires = [
  90. 'psycopg2>=2.5.0,<2.6.0',
  91. ]
  92. postgres_pypy_requires = [
  93. 'psycopg2cffi',
  94. ]
  95. mysql_requires = [
  96. 'MySQL-python>=1.2.0,<1.3.0',
  97. ]
  98. class PyTest(TestCommand):
  99. def finalize_options(self):
  100. TestCommand.finalize_options(self)
  101. self.test_args = ['tests']
  102. self.test_suite = True
  103. def run_tests(self):
  104. # import here, cause outside the eggs aren't loaded
  105. import pytest
  106. errno = pytest.main(self.test_args)
  107. sys.exit(errno)
  108. setup(
  109. name='sentry',
  110. version='7.0.0-DEV',
  111. author='David Cramer',
  112. author_email='dcramer@gmail.com',
  113. url='https://www.getsentry.com',
  114. description='A realtime logging and aggregation server.',
  115. long_description=open('README.rst').read(),
  116. package_dir={'': 'src'},
  117. packages=find_packages('src'),
  118. zip_safe=False,
  119. install_requires=install_requires,
  120. extras_require={
  121. 'tests': tests_require,
  122. 'dev': dev_requires,
  123. 'postgres': install_requires + postgres_requires,
  124. 'postgres_pypy': install_requires + postgres_pypy_requires,
  125. 'mysql': install_requires + mysql_requires,
  126. },
  127. tests_require=tests_require,
  128. cmdclass={'test': PyTest},
  129. license='BSD',
  130. include_package_data=True,
  131. entry_points={
  132. 'console_scripts': [
  133. 'sentry = sentry.utils.runner:main',
  134. ],
  135. },
  136. classifiers=[
  137. 'Framework :: Django',
  138. 'Intended Audience :: Developers',
  139. 'Intended Audience :: System Administrators',
  140. 'Operating System :: OS Independent',
  141. 'Topic :: Software Development'
  142. ],
  143. )