forked from etalab/ckanext-sentry
-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
72 lines (63 loc) · 1.98 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from setuptools import setup, find_packages
from ckanext.sentry import __version__, __description__
RE_REQUIREMENT = re.compile(r'^\s*-r\s*(?P<filename>.*)$')
PYPI_RST_FILTERS = (
# Remove travis ci badge
(r'.*travis-ci\.org/.*', ''),
# Remove pypip.in badges
(r'.*pypip\.in/.*', ''),
(r'.*crate\.io/.*', ''),
(r'.*coveralls\.io/.*', ''),
)
def rst(filename):
'''
Load rst file and sanitize it for PyPI.
Remove unsupported github tags:
- code-block directive
- travis ci build badge
'''
content = open(filename).read()
for regex, replacement in PYPI_RST_FILTERS:
content = re.sub(regex, replacement, content)
return content
long_description = '\n'.join((
rst('README.rst'),
''
))
setup(
name='ckanext-sentry',
version=__version__,
description=__description__,
long_description=long_description,
keywords='CKAN, Sentry',
author='Adrià Mercader',
author_email='adria.mercader@okfn.org',
url='https://github.com/okfn/ckanext-sentry',
license='',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
namespace_packages=['ckanext'],
include_package_data=True,
zip_safe=False,
install_requires=['raven'],
entry_points={
'ckan.plugins': [
'sentry = ckanext.sentry.plugins:SentryPlugin',
]
},
classifiers=[
"Development Status :: 3 - Alpha",
"Environment :: Web Environment",
'Framework :: Pylons',
'Intended Audience :: Developers',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: Session',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Systems Administration :: Authentication/Directory',
],
)