#!/usr/bin/env python # -*- coding: utf-8 -*- """Kafka Utils.""" from setuptools import find_packages from setuptools import setup from kafka_utils import __version__ AVRO_REQUIRES = ['confluent-kafka[avro]>=2.1,<2.7'] JSON_REQUIRES = ['confluent-kafka[json]>=2.1,<2.7'] def read_requirements(path): """Read requirements from file based on file path provided.""" with open(path, 'r') as fd: requirements = [ req.strip() for req in fd.readlines() if not req.startswith('-')] return requirements install_requires = list(read_requirements('requirements.txt')) setup( name='kafka_utils', version=__version__, description='Utilities for producing and consuming kafka messages.', author='The Orchard', author_email='webdev@theorchard.com', url='https://github.com/theorchard/python-kafka-utils', packages=find_packages(exclude=('tests', 'examples')), test_suite='tests', zip_safe=False, install_requires=install_requires, extras_require={ 'avro': AVRO_REQUIRES, 'json': JSON_REQUIRES }, entry_points={ 'pytest11': [ 'kafka_utils = kafka_utils.testing.unit.fixture_plugin' ] }, include_package_data=True, )