#!/usr/bin/env python
"""
Sentry
======

Sentry is a realtime event logging and aggregation platform. It specializes
in monitoring errors and extracting all the information needed to do a proper
post-mortem without any of the hassle of the standard user feedback loop.

Sentry is a Server
------------------

The Sentry package, at its core, is just a simple server and web UI. It will
handle authentication clients (such as `Raven <https://github.com/dcramer/raven>`_)
and all of the logic behind storage and aggregation.

That said, Sentry is not limited to Python. The primary implementation is in
Python, but it contains a full API for sending events from any language, in
any application.

:copyright: (c) 2011-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""

from setuptools import setup, find_packages

# Hack to prevent stupid "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when running `python
# setup.py test` (see
# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
    import multiprocessing
except ImportError:
    pass

tests_require = [
    'django-nose==1.1',
    'eventlet==0.9.16',
    'nose==1.1.2',
    'nydus==0.8.2',
    'mock==0.8.0',
    'pyflakes',
    'pep8',
    'redis',
    'unittest2',
]


install_requires = [
    'cssutils>=0.9.9',
    'BeautifulSoup>=3.2.1',
    'django-celery>=2.5.5,<3.0',
    'django-crispy-forms>=1.1.4',
    'Django>=1.2,<1.5',
    'django-indexer>=0.3.0',
    'django-paging>=0.2.4',
    'django-picklefield>=0.2.0',
    'django-templatetag-sugar>=0.1.0',
    'gunicorn>=0.13.4',
    'logan>=0.3.1',
    'pynliner>=0.4.0',
    'python-dateutil>=1.5.0,<2.0.0',
    'pytz>=2011n',
    'raven>=2.0.0',
    'simplejson>=2.3.0,<2.5.0',
    'South>=0.7',
    'httpagentparser>=1.0.5'
]

dependency_links = [
    'https://github.com/dcramer/pyflakes/tarball/master#egg=pyflakes',
]

setup(
    name='sentry',
    version='4.8.1',
    author='David Cramer',
    author_email='dcramer@gmail.com',
    url='http://github.com/dcramer/sentry',
    description='A realtime logging and aggregation server.',
    long_description=__doc__,
    packages=find_packages(exclude=['tests']),
    zip_safe=False,
    install_requires=install_requires,
    tests_require=tests_require,
    extras_require={'test': tests_require},
    dependency_links=dependency_links,
    test_suite='runtests.runtests',
    license='BSD',
    include_package_data=True,
    entry_points={
        'console_scripts': [
            'sentry = sentry.utils.runner:main',
        ],
    },
    classifiers=[
        'Framework :: Django',
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'Operating System :: OS Independent',
        'Topic :: Software Development'
    ],
)

setup.py
#!/usr/bin/env python
"""
Sentry
======

Sentry is a realtime event logging and aggregation platform. It specializes
in monitoring errors and extracting all the information needed to do a proper
post-mortem without any of the hassle of the standard user feedback loop.

Sentry is a Server
------------------

The Sentry package, at its core, is just a simple server and web UI. It will
handle authentication clients (such as `Raven <https://github.com/dcramer/raven>`_)
and all of the logic behind storage and aggregation.

That said, Sentry is not limited to Python. The primary implementation is in
Python, but it contains a full API for sending events from any language, in
any application.

:copyright: (c) 2011-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""

from setuptools import setup, find_packages

# Hack to prevent stupid "TypeError: 'NoneType' object is not callable" error
# in multiprocessing/util.py _exit_function when running `python
# setup.py test` (see
# http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
    import multiprocessing
except ImportError:
    pass

tests_require = [
    'django-nose==1.1',
    'eventlet==0.9.16',
    'nose==1.1.2',
    'nydus==0.8.2',
    'mock==0.8.0',
    'pyflakes',
    'pep8',
    'redis',
    'unittest2',
]


install_requires = [
    'cssutils>=0.9.9',
    'BeautifulSoup>=3.2.1',
    'django-celery>=2.5.5,<3.0',
    'celery>=2.5.3,<3.0',
    'django-crispy-forms>=1.1.4',
    'Django>=1.2,<1.5',
    'django-indexer>=0.3.0',
    'django-paging>=0.2.4',
    'django-picklefield>=0.2.0',
    'django-templatetag-sugar>=0.1.0',
    'gunicorn>=0.13.4',
    'logan>=0.3.1',
    'pynliner>=0.4.0',
    'python-dateutil>=1.5.0,<2.0.0',
    'pytz>=2011n',
    'raven>=2.0.0',
    'simplejson>=2.3.0,<2.5.0',
    'South>=0.7',
    'httpagentparser>=1.0.5'
]

dependency_links = [
    'https://github.com/dcramer/pyflakes/tarball/master#egg=pyflakes',
]

setup(
    name='sentry',
    version='4.8.1',
    author='David Cramer',
    author_email='dcramer@gmail.com',
    url='http://github.com/dcramer/sentry',
    description='A realtime logging and aggregation server.',
    long_description=__doc__,
    packages=find_packages(exclude=['tests']),
    zip_safe=False,
    install_requires=install_requires,
    tests_require=tests_require,
    extras_require={'test': tests_require},
    dependency_links=dependency_links,
    test_suite='runtests.runtests',
    license='BSD',
    include_package_data=True,
    entry_points={
        'console_scripts': [
            'sentry = sentry.utils.runner:main',
        ],
    },
    classifiers=[
        'Framework :: Django',
        'Intended Audience :: Developers',
        'Intended Audience :: System Administrators',
        'Operating System :: OS Independent',
        'Topic :: Software Development'
    ],
)

setup.py
diff --git a/setup.py b/setup.py
index 0d6590e1f79f66..446fa24c657cd3 100755
--- a/setup.py
+++ b/setup.py
@@ -50,6 +50,7 @@
     'cssutils>=0.9.9',
     'BeautifulSoup>=3.2.1',
     'django-celery>=2.5.5,<3.0',
+    'celery>=2.5.3,<3.0',
     'django-crispy-forms>=1.1.4',
     'Django>=1.2,<1.5',
     'django-indexer>=0.3.0',

celery 3.0 causes import error (cannot import abbrtools from celery.utils)
Release of celery 3.0 causes an import error at runtime upon any request.

This is the stack trace:

```
ImportError: cannot import name abbrtask
Error handling request
Traceback (most recent call last):
  File "/Users/guzru/dev/django14/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 107, in handle_request
    for item in respiter:
  File "/Users/guzru/dev/django14/lib/python2.7/site-packages/raven/middleware.py", line 28, in __call__
    for event in self.application(environ, start_response):
  File "/Users/guzru/dev/django14/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 241, in __call__
    response = self.get_response(request)
  File "/Users/guzru/dev/django14/lib/python2.7/site-packages/django/core/handlers/base.py", line 179, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/Users/guzru/dev/django14/lib/python2.7/site-packages/django/core/handlers/base.py", line 224, in handle_uncaught_exception
    if resolver.urlconf_module is None:
  File "/Users/guzru/dev/django14/lib/python2.7/site-packages/django/core/urlresolvers.py", line 323, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/Users/guzru/dev/django14/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Users/guzru/dev/django14/lib/python2.7/site-packages/sentry/conf/urls.py", line 19, in <module>
    admin.autodiscover()
  File "/Users/guzru/dev/django14/lib/python2.7/site-packages/django/contrib/admin/__init__.py", line 29, in autodiscover
    import_module('%s.admin' % app)
  File "/Users/guzru/dev/django14/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/Users/guzru/dev/django14/lib/python2.7/site-packages/djcelery/admin.py", line 19, in <module>
    from celery.utils import abbrtask
ImportError: cannot import name abbrtask
```

Requirements line for celery should become:

celery>=2.5.3,<3.0.0

