setup.py 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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-2012 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. 'exam>=0.5.1',
  41. 'eventlet',
  42. 'httpretty',
  43. 'pytest',
  44. 'pytest-cov>=1.4',
  45. 'pytest-django',
  46. 'pytest-timeout',
  47. 'python-coveralls',
  48. 'nydus',
  49. 'mock>=0.8.0',
  50. 'redis',
  51. 'riak',
  52. 'unittest2',
  53. ]
  54. install_requires = [
  55. 'BeautifulSoup>=3.2.1,<3.3.0',
  56. 'celery>=3.0.15,<3.1.0',
  57. 'cssutils>=0.9.9,<0.10.0',
  58. 'Django>=1.5.4,<1.6',
  59. 'django-celery>=3.0.11,<3.1.0',
  60. 'django-crispy-forms>=1.2.3,<1.3.0',
  61. 'django-paging>=0.2.4,<0.3.0',
  62. 'django-picklefield>=0.3.0,<0.4.0',
  63. 'django-social-auth>=0.7.28,<0.8.0',
  64. 'django-static-compiler>=0.3.0,<0.4.0',
  65. 'django-templatetag-sugar>=0.1.0,<0.2.0',
  66. 'gunicorn>=0.17.2,<0.18.0',
  67. 'httpagentparser>=1.2.1,<1.3.0',
  68. 'logan>=0.5.8.2,<0.6.0',
  69. 'nydus>=0.10.0,<0.11.0',
  70. 'Pygments>=1.6.0,<1.7.0',
  71. 'pynliner>=0.4.0,<0.6.0',
  72. 'python-dateutil>=1.5.0,<2.0.0',
  73. 'python-memcached>=1.53,<2.0.0',
  74. 'raven>=3.3.8',
  75. 'redis>=2.7.0,<2.9.0',
  76. 'simplejson>=3.1.0,<3.4.0',
  77. 'setproctitle>=1.1.7,<1.2.0',
  78. 'South>=0.8.0,<0.9.0',
  79. 'urllib3>=1.7.1,<1.8.0',
  80. ]
  81. postgres_requires = [
  82. 'psycopg2>=2.5.0,<2.6.0',
  83. ]
  84. postgres_pypy_requires = [
  85. 'psycopg2cffi',
  86. ]
  87. mysql_requires = [
  88. 'MySQL-python>=1.2.0,<1.3.0',
  89. ]
  90. class PyTest(TestCommand):
  91. def finalize_options(self):
  92. TestCommand.finalize_options(self)
  93. self.test_args = ['tests']
  94. self.test_suite = True
  95. def run_tests(self):
  96. #import here, cause outside the eggs aren't loaded
  97. import pytest
  98. errno = pytest.main(self.test_args)
  99. sys.exit(errno)
  100. setup(
  101. name='sentry',
  102. version='6.4.0',
  103. author='David Cramer',
  104. author_email='dcramer@gmail.com',
  105. url='https://www.getsentry.com',
  106. description='A realtime logging and aggregation server.',
  107. long_description=open('README.rst').read(),
  108. package_dir={'': 'src'},
  109. packages=find_packages('src'),
  110. zip_safe=False,
  111. install_requires=install_requires,
  112. extras_require={
  113. 'tests': tests_require,
  114. 'dev': dev_requires,
  115. 'postgres': install_requires + postgres_requires,
  116. 'postgres_pypy': install_requires + postgres_pypy_requires,
  117. 'mysql': install_requires + mysql_requires,
  118. },
  119. tests_require=tests_require,
  120. cmdclass={'test': PyTest},
  121. license='BSD',
  122. include_package_data=True,
  123. entry_points={
  124. 'console_scripts': [
  125. 'sentry = sentry.utils.runner:main',
  126. ],
  127. },
  128. classifiers=[
  129. 'Framework :: Django',
  130. 'Intended Audience :: Developers',
  131. 'Intended Audience :: System Administrators',
  132. 'Operating System :: OS Independent',
  133. 'Topic :: Software Development'
  134. ],
  135. )