forked from confluentinc/confluent-kafka-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·40 lines (34 loc) · 1.23 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
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
from distutils.core import Extension
import sys
if sys.version_info[0] < 3:
avro = 'avro'
else:
avro = 'avro-python3'
module = Extension('confluent_kafka.cimpl',
libraries=['rdkafka'],
sources=['confluent_kafka/src/confluent_kafka.c',
'confluent_kafka/src/Producer.c',
'confluent_kafka/src/Consumer.c'])
def get_install_requirements(path):
content = open(os.path.join(os.path.dirname(__file__), path)).read()
return [
req
for req in content.split("\n")
if req != '' and not req.startswith('#')
]
setup(name='confluent-kafka',
version='0.11.4',
description='Confluent\'s Apache Kafka client for Python',
author='Confluent Inc',
author_email='[email protected]',
url='https://github.com/confluentinc/confluent-kafka-python',
ext_modules=[module],
packages=find_packages(exclude=("tests", "tests.*")),
data_files=[('', ['LICENSE.txt'])],
extras_require={
'avro': ['fastavro', 'requests', avro],
'dev': get_install_requirements("test-requirements.txt")
})