-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsetup.py
95 lines (85 loc) · 2.26 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
import os
from setuptools import setup
EXTRAS = {
'rabbitmq': [
'txAMQP'
],
'redis': [
'txredis',
],
'scribe': [
'thrift',
'scribe',
],
'kafka': [
'kafka-python',
],
'dev': [
'coverage',
'pyflakes',
'Sphinx',
]
}
EXTRAS['all'] = (
EXTRAS['rabbitmq'] +
EXTRAS['redis'] +
EXTRAS['scribe'] +
EXTRAS['kafka']
)
# Make sure 'twisted' doesn't appear in top_level.txt
try:
from setuptools.command import egg_info
egg_info.write_toplevel_names
except (ImportError, AttributeError):
pass
else:
def _top_level_package(name):
return name.split('.', 1)[0]
def _hacked_write_toplevel_names(cmd, basename, filename):
pkgs = dict.fromkeys(
[_top_level_package(k)
for k in cmd.distribution.iter_distribution_names()
if _top_level_package(k) != "twisted"
]
)
cmd.write_file("top-level names", filename, '\n'.join(pkgs) + '\n')
egg_info.write_toplevel_names = _hacked_write_toplevel_names
# Utility function to read the README file.
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="udplog",
version="0.2.0",
author="Mochi Media",
author_email="[email protected]",
maintainer="Ralph Meijer",
maintainer_email="[email protected]",
description=("UDPLog is a system for emitting application log events"
" via UDP and shipping them via RabbitMQ or Scribe for "
"further processing."),
license="MIT",
keywords="logging twisted udp scribe rabbitmq redis kafka",
url="https://github.com/mochi/udplog",
packages=[
'udplog',
'udplog.test',
'twisted.plugins',
],
package_data={
'twisted.plugins': ['twisted/plugins/server.py'],
'udplog': ['amqp0-9-1.extended.xml'],
},
zip_safe=False,
long_description=read('README.rst'),
classifiers=[
"Development Status :: 6 - Production/Stable",
"Topic :: Utilities",
"License :: OSI Approved :: MIT License",
],
install_requires=[
'simplejson',
'Twisted >= 13.0.0',
'python-dateutil',
],
extras_require=EXTRAS,
)