1
|
|
|
from setuptools import setup, find_packages |
2
|
|
|
import platform |
3
|
|
|
|
4
|
|
|
# Pull version from source without importing |
5
|
|
|
# since we can't import something we haven't built yet :) |
6
|
|
|
exec(open('kafka_influxdb/version.py').read()) |
7
|
|
|
|
8
|
|
|
# Create reStructuredText README file for PyPi |
9
|
|
|
# http://stackoverflow.com/a/26737672/270334 |
10
|
|
|
try: |
11
|
|
|
import pypandoc |
12
|
|
|
|
13
|
|
|
long_description = pypandoc.convert('README.md', 'rst') |
14
|
|
|
except(IOError, ImportError): |
15
|
|
|
long_description = open('README.md').read() |
16
|
|
|
|
17
|
|
|
requires = [ |
18
|
|
|
"certifi", |
19
|
|
|
"funcsigs", |
20
|
|
|
"influxdb", |
21
|
|
|
"kafka-python", |
22
|
|
|
"pbr", |
23
|
|
|
"python-dateutil", |
24
|
|
|
"pytz", |
25
|
|
|
"PyYAML", |
26
|
|
|
"requests", |
27
|
|
|
"virtualenv", |
28
|
|
|
"wheel", |
29
|
|
|
"pytest-runner" |
30
|
|
|
] |
31
|
|
|
|
32
|
|
|
test_requires = [ |
33
|
|
|
"pytest", |
34
|
|
|
'profilehooks' |
35
|
|
|
] |
36
|
|
|
|
37
|
|
|
# Get an additional speedup with ujson, |
38
|
|
|
# which is faster than the normal Python json module. |
39
|
|
|
# ujson does not work with PyPy |
40
|
|
|
# See https://github.com/esnme/ultrajson/issues/98 |
41
|
|
|
if not platform.python_implementation() == 'PyPy': |
42
|
|
|
requires.extend([ |
43
|
|
|
"ujson", |
44
|
|
|
"confluent_kafka" |
45
|
|
|
]) |
46
|
|
|
|
47
|
|
|
setup(name='kafka_influxdb', |
48
|
|
|
version=__version__, |
49
|
|
|
description='A Kafka consumer for InfluxDB', |
50
|
|
|
long_description=long_description, |
51
|
|
|
classifiers=[ |
52
|
|
|
'Development Status :: 4 - Beta', |
53
|
|
|
'License :: OSI Approved :: Apache Software License', |
54
|
|
|
'Topic :: Utilities', |
55
|
|
|
"Programming Language :: Python", |
56
|
|
|
"Programming Language :: Python :: 2", |
57
|
|
|
"Programming Language :: Python :: 2.7", |
58
|
|
|
"Programming Language :: Python :: 3", |
59
|
|
|
"Programming Language :: Python :: 3.3", |
60
|
|
|
"Programming Language :: Python :: 3.4", |
61
|
|
|
"Programming Language :: Python :: 3.5", |
62
|
|
|
"Programming Language :: Python :: 3.6", |
63
|
|
|
"Programming Language :: Python :: Implementation :: PyPy", |
64
|
|
|
], |
65
|
|
|
keywords='kafka influxdb metrics consumer', |
66
|
|
|
url='http://github.com/mre/kafka-influxdb', |
67
|
|
|
author='Matthias Endler', |
68
|
|
|
author_email='[email protected]', |
69
|
|
|
license='Apache', |
70
|
|
|
packages=find_packages(), |
71
|
|
|
install_requires=requires, |
72
|
|
|
tests_require=test_requires, |
73
|
|
|
entry_points={ |
74
|
|
|
'console_scripts': ['kafka_influxdb=kafka_influxdb.__main__:main'], |
75
|
|
|
}, |
76
|
|
|
include_package_data=True, |
77
|
|
|
zip_safe=False) |
78
|
|
|
|