|
1 | 1 | #!/usr/bin/env python
|
2 | 2 |
|
3 | 3 | import os
|
4 |
| -from setuptools import setup, find_packages |
| 4 | +from setuptools import setup |
5 | 5 | from distutils.core import Extension
|
6 | 6 | import platform
|
7 | 7 |
|
8 |
| -work_dir = os.path.dirname(os.path.realpath(__file__)) |
9 |
| -mod_dir = os.path.join(work_dir, 'src', 'confluent_kafka') |
| 8 | +mod_dir = os.path.join('src', 'confluent_kafka') |
10 | 9 | ext_dir = os.path.join(mod_dir, 'src')
|
11 | 10 |
|
12 |
| -INSTALL_REQUIRES = [ |
13 |
| - 'futures;python_version<"3.2"', |
14 |
| - 'enum34;python_version<"3.4"', |
15 |
| -] |
16 |
| - |
17 |
| -TEST_REQUIRES = [ |
18 |
| - 'pytest==4.6.4;python_version<"3.0"', |
19 |
| - 'pytest;python_version>="3.0"', |
20 |
| - 'pytest-timeout', |
21 |
| - 'flake8' |
22 |
| -] |
23 |
| - |
24 |
| -DOC_REQUIRES = ['sphinx', 'sphinx-rtd-theme'] |
25 |
| - |
26 |
| -SCHEMA_REGISTRY_REQUIRES = ['requests'] |
27 |
| - |
28 |
| -AVRO_REQUIRES = ['fastavro>=0.23.0,<1.0;python_version<"3.0"', |
29 |
| - 'fastavro>=1.0;python_version>"3.0"', |
30 |
| - 'avro>=1.11.1,<2', |
31 |
| - ] + SCHEMA_REGISTRY_REQUIRES |
32 |
| - |
33 |
| -JSON_REQUIRES = ['pyrsistent==0.16.1;python_version<"3.0"', |
34 |
| - 'pyrsistent;python_version>"3.0"', |
35 |
| - 'jsonschema'] + SCHEMA_REGISTRY_REQUIRES |
36 |
| - |
37 |
| -PROTO_REQUIRES = ['protobuf'] + SCHEMA_REGISTRY_REQUIRES |
38 |
| - |
39 | 11 | # On Un*x the library is linked as -lrdkafka,
|
40 | 12 | # while on windows we need the full librdkafka name.
|
41 | 13 | if platform.system() == 'Windows':
|
|
52 | 24 | os.path.join(ext_dir, 'AdminTypes.c'),
|
53 | 25 | os.path.join(ext_dir, 'Admin.c')])
|
54 | 26 |
|
55 |
| - |
56 |
| -def get_install_requirements(path): |
57 |
| - content = open(os.path.join(os.path.dirname(__file__), path)).read() |
58 |
| - return [ |
59 |
| - req |
60 |
| - for req in content.split("\n") |
61 |
| - if req != '' and not req.startswith('#') |
62 |
| - ] |
63 |
| - |
64 |
| - |
65 |
| -trove_classifiers = [ |
66 |
| - 'Development Status :: 5 - Production/Stable', |
67 |
| - 'Intended Audience :: Developers', |
68 |
| - 'License :: OSI Approved :: Apache Software License', |
69 |
| - 'Programming Language :: Python', |
70 |
| - 'Programming Language :: Python :: 2.7', |
71 |
| - 'Programming Language :: Python :: 3', |
72 |
| - 'Topic :: Software Development :: Libraries :: Python Modules', |
73 |
| -] |
74 |
| - |
75 |
| -setup(name='confluent-kafka', |
76 |
| - # Make sure to bump CFL_VERSION* in confluent_kafka/src/confluent_kafka.h |
77 |
| - # and version in docs/conf.py. |
78 |
| - version='2.3.0', |
79 |
| - description='Confluent\'s Python client for Apache Kafka', |
80 |
| - author='Confluent Inc', |
81 |
| - |
82 |
| - url='https://github.com/confluentinc/confluent-kafka-python', |
83 |
| - ext_modules=[module], |
84 |
| - packages=find_packages('src'), |
85 |
| - package_dir={'': 'src'}, |
86 |
| - data_files=[('', [os.path.join(work_dir, 'LICENSE.txt')])], |
87 |
| - install_requires=INSTALL_REQUIRES, |
88 |
| - classifiers=trove_classifiers, |
89 |
| - extras_require={ |
90 |
| - 'schema-registry': SCHEMA_REGISTRY_REQUIRES, |
91 |
| - 'avro': AVRO_REQUIRES, |
92 |
| - 'json': JSON_REQUIRES, |
93 |
| - 'protobuf': PROTO_REQUIRES, |
94 |
| - 'dev': TEST_REQUIRES + AVRO_REQUIRES, |
95 |
| - 'doc': DOC_REQUIRES + AVRO_REQUIRES |
96 |
| - }) |
| 27 | +setup(ext_modules=[module]) |
0 commit comments