debian-python-raven/setup.py

140 lines
3.6 KiB
Python
Raw Normal View History

2008-05-12 18:28:33 +02:00
#!/usr/bin/env python
"""
Raven
2014-02-02 05:54:59 +01:00
=====
Raven is a Python client for `Sentry <http://getsentry.com/>`_. It provides
full out-of-the-box support for many of the popular frameworks, including
`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.
"""
2008-05-12 18:28:33 +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-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
install_requires = [
'contextlib2',
]
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
]
flask_tests_requires = [
'Flask-Login>=0.2.0',
]
webpy_tests_requires = [
'paste',
'web.py',
]
2014-09-22 09:34:48 +02:00
# If it's python3, remove unittest2 & web.py
if sys.version_info[0] == 3:
unittest2_requires = []
webpy_tests_requires = []
# 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 = [
'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',
'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',
'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
def initialize_options(self):
TestCommand.initialize_options(self)
2015-02-13 02:03:06 +01:00
self.pytest_args = []
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)
setup(
2012-01-18 20:58:32 +01:00
name='raven',
2016-03-07 21:07:57 +01:00
version='5.11.1',
2016-01-28 00:07:56 +01:00
author='Sentry',
author_email='hello@getsentry.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)',
long_description=__doc__,
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,
install_requires=install_requires,
2013-06-26 09:32:04 +02:00
cmdclass={'test': PyTest},
include_package_data=True,
entry_points={
'console_scripts': [
'raven = raven.scripts.runner:main',
],
'paste.filter_app_factory': [
'raven = raven.contrib.paste:sentry_filter_factory',
],
},
classifiers=[
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python',
'Topic :: Software Development',
],
)