2008-05-12 18:28:33 +02:00
|
|
|
#!/usr/bin/env python
|
2011-12-24 08:28:17 +01:00
|
|
|
"""
|
|
|
|
Raven
|
2014-02-02 05:54:59 +01:00
|
|
|
=====
|
2011-12-24 08:28:17 +01:00
|
|
|
|
2012-04-30 21:07:29 +02:00
|
|
|
Raven is a Python client for `Sentry <http://getsentry.com/>`_. It provides
|
2011-12-24 08:28:17 +01:00
|
|
|
full out-of-the-box support for many of the popular frameworks, including
|
2012-04-30 21:07:29 +02:00
|
|
|
`Django <djangoproject.com>`_, `Flask <http://flask.pocoo.org/>`_, and `Pylons
|
|
|
|
<http://www.pylonsproject.org/>`_. Raven also includes drop-in support for any
|
|
|
|
`WSGI <http://wsgi.readthedocs.org/>`_-compatible web application.
|
2011-12-24 08:28:17 +01:00
|
|
|
"""
|
2008-05-12 18:28:33 +02:00
|
|
|
|
2012-04-30 01:59:54 +02:00
|
|
|
# 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)
|
2012-09-04 00:49:02 +02:00
|
|
|
for m in ('multiprocessing', 'billiard'):
|
|
|
|
try:
|
|
|
|
__import__(m)
|
|
|
|
except ImportError:
|
|
|
|
pass
|
2012-04-30 01:59:54 +02:00
|
|
|
|
2012-01-03 12:07:19 +01:00
|
|
|
from setuptools import setup, find_packages
|
2013-06-26 09:32:04 +02:00
|
|
|
from setuptools.command.test import test as TestCommand
|
2013-04-19 09:55:53 +02:00
|
|
|
import sys
|
2008-05-12 18:28:33 +02:00
|
|
|
|
2015-11-21 15:47:20 +01:00
|
|
|
install_requires = [
|
|
|
|
'contextlib2',
|
|
|
|
]
|
|
|
|
|
2013-04-22 21:37:43 +02:00
|
|
|
unittest2_requires = ['unittest2']
|
2013-04-05 09:00:24 +02:00
|
|
|
flask_requires = [
|
|
|
|
'Flask>=0.8',
|
2013-02-22 23:32:35 +01:00
|
|
|
'blinker>=1.1',
|
2013-04-05 09:00:24 +02:00
|
|
|
]
|
|
|
|
|
2013-05-01 20:02:11 +02:00
|
|
|
flask_tests_requires = [
|
2013-06-22 00:29:09 +02:00
|
|
|
'Flask-Login>=0.2.0',
|
2013-05-01 20:02:11 +02:00
|
|
|
]
|
|
|
|
|
2013-09-10 13:18:02 +02:00
|
|
|
webpy_tests_requires = [
|
|
|
|
'paste',
|
|
|
|
'web.py',
|
|
|
|
]
|
|
|
|
|
2014-09-22 09:34:48 +02:00
|
|
|
# If it's python3, remove unittest2 & web.py
|
2013-04-22 21:37:43 +02:00
|
|
|
if sys.version_info[0] == 3:
|
|
|
|
unittest2_requires = []
|
2013-09-10 13:18:02 +02:00
|
|
|
webpy_tests_requires = []
|
|
|
|
|
2015-11-21 15:47:20 +01:00
|
|
|
# If it's python3.2 or greater, don't use contextlib backport
|
|
|
|
if sys.version_info[1] >= 2:
|
|
|
|
install_requires.remove('contextlib2')
|
|
|
|
|
2013-04-05 09:00:24 +02:00
|
|
|
tests_require = [
|
2016-01-12 21:40:51 +01:00
|
|
|
'six',
|
2013-05-27 03:13:18 +02:00
|
|
|
'bottle',
|
2013-02-22 23:32:35 +01:00
|
|
|
'celery>=2.5',
|
2014-03-19 09:42:27 +01:00
|
|
|
'Django>=1.4',
|
2013-02-22 23:32:35 +01:00
|
|
|
'django-celery>=2.5',
|
|
|
|
'exam>=0.5.2',
|
2015-12-02 02:31:52 +01:00
|
|
|
'flake8>=2.0,<2.1',
|
2013-02-22 23:32:35 +01:00
|
|
|
'logbook',
|
|
|
|
'mock',
|
2013-05-25 04:20:07 +02:00
|
|
|
'nose',
|
2013-02-22 23:32:35 +01:00
|
|
|
'pep8',
|
|
|
|
'pytz',
|
2015-12-02 02:31:52 +01:00
|
|
|
'pytest',
|
2016-01-13 17:32:32 +01:00
|
|
|
'pytest-django==2.9.1',
|
2015-08-03 02:40:11 +02:00
|
|
|
'pytest-timeout==0.4',
|
2014-07-05 03:07:34 +02:00
|
|
|
'requests',
|
2013-02-22 23:32:35 +01:00
|
|
|
'tornado',
|
|
|
|
'webob',
|
2013-05-27 03:13:18 +02:00
|
|
|
'webtest',
|
2013-04-23 04:20:14 +02:00
|
|
|
'anyjson',
|
2015-07-07 03:25:50 +02:00
|
|
|
] + (flask_requires + flask_tests_requires +
|
2014-06-19 17:49:48 +02:00
|
|
|
unittest2_requires + webpy_tests_requires)
|
2011-03-16 15:23:14 +01:00
|
|
|
|
2013-06-26 09:33:22 +02:00
|
|
|
|
|
|
|
class PyTest(TestCommand):
|
2015-02-13 02:03:06 +01:00
|
|
|
|
2014-07-05 02:36:00 +02:00
|
|
|
def initialize_options(self):
|
|
|
|
TestCommand.initialize_options(self)
|
2015-02-13 02:03:06 +01:00
|
|
|
self.pytest_args = []
|
2014-07-05 02:36:00 +02:00
|
|
|
|
2013-06-26 09:33:22 +02:00
|
|
|
def finalize_options(self):
|
|
|
|
TestCommand.finalize_options(self)
|
2015-02-13 02:03:06 +01:00
|
|
|
self.test_args = []
|
|
|
|
self.test_suite = True
|
2013-06-26 09:33:22 +02:00
|
|
|
|
|
|
|
def run_tests(self):
|
2014-10-15 11:16:02 +02:00
|
|
|
# import here, cause outside the eggs aren't loaded
|
2013-06-26 09:33:22 +02:00
|
|
|
import pytest
|
2015-02-13 02:03:06 +01:00
|
|
|
errno = pytest.main(self.pytest_args)
|
2013-06-26 09:33:22 +02:00
|
|
|
sys.exit(errno)
|
|
|
|
|
|
|
|
|
2009-09-17 21:57:15 +02:00
|
|
|
setup(
|
2012-01-18 20:58:32 +01:00
|
|
|
name='raven',
|
2016-01-21 20:49:55 +01:00
|
|
|
version='5.10.2.dev.0',
|
2009-11-09 23:21:50 +01:00
|
|
|
author='David Cramer',
|
|
|
|
author_email='dcramer@gmail.com',
|
2015-07-06 16:56:45 +02:00
|
|
|
url='https://github.com/getsentry/raven-python',
|
2015-11-11 00:40:27 +01:00
|
|
|
description='Raven is a client for Sentry (https://getsentry.com)',
|
2011-12-24 08:28:17 +01:00
|
|
|
long_description=__doc__,
|
2012-01-19 16:17:34 +01:00
|
|
|
packages=find_packages(exclude=("tests", "tests.*",)),
|
2010-09-11 02:57:44 +02:00
|
|
|
zip_safe=False,
|
2013-02-22 23:32:35 +01:00
|
|
|
extras_require={
|
2013-04-05 08:59:25 +02:00
|
|
|
'flask': flask_requires,
|
2013-02-22 23:32:35 +01:00
|
|
|
'tests': tests_require,
|
|
|
|
},
|
2013-06-27 04:07:15 +02:00
|
|
|
license='BSD',
|
2013-06-26 09:35:31 +02:00
|
|
|
tests_require=tests_require,
|
2015-11-21 15:47:20 +01:00
|
|
|
install_requires=install_requires,
|
2013-06-26 09:32:04 +02:00
|
|
|
cmdclass={'test': PyTest},
|
2009-09-17 21:57:15 +02:00
|
|
|
include_package_data=True,
|
2012-02-02 09:54:03 +01:00
|
|
|
entry_points={
|
|
|
|
'console_scripts': [
|
|
|
|
'raven = raven.scripts.runner:main',
|
|
|
|
],
|
2012-05-23 18:21:24 +02:00
|
|
|
'paste.filter_app_factory': [
|
|
|
|
'raven = raven.contrib.paste:sentry_filter_factory',
|
|
|
|
],
|
2012-02-02 09:54:03 +01:00
|
|
|
},
|
2009-09-17 21:57:15 +02:00
|
|
|
classifiers=[
|
2009-11-09 23:21:50 +01:00
|
|
|
'Intended Audience :: Developers',
|
|
|
|
'Intended Audience :: System Administrators',
|
|
|
|
'Operating System :: OS Independent',
|
2014-09-22 08:45:45 +02:00
|
|
|
'Programming Language :: Python :: 2',
|
2013-04-05 10:26:34 +02:00
|
|
|
'Programming Language :: Python :: 2.6',
|
|
|
|
'Programming Language :: Python :: 2.7',
|
2014-09-22 08:45:45 +02:00
|
|
|
'Programming Language :: Python :: 3',
|
2013-04-05 10:26:34 +02:00
|
|
|
'Programming Language :: Python :: 3.2',
|
2014-09-22 08:45:45 +02:00
|
|
|
'Programming Language :: Python :: 3.3',
|
|
|
|
'Programming Language :: Python :: 3.4',
|
|
|
|
'Programming Language :: Python',
|
|
|
|
'Topic :: Software Development',
|
2009-09-17 21:57:15 +02:00
|
|
|
],
|
2011-03-14 20:55:49 +01:00
|
|
|
)
|