setup.py 3.9 KB

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