-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
84 lines (74 loc) · 2.88 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
#!/usr/bin/env python3
"""
Preparation instructions: https://packaging.python.org/tutorials/packaging-projects/
"""
import os.path
import re
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
__version__ = re.search(
r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
open("redis_streams/__init__.py").read(),
).group(1)
def get_readme():
readme = list()
with open("README.md", "r") as f:
skip_lines = True
for line in f.read().splitlines():
if line.startswith("# Redis-Streams"):
skip_lines = False
if line.startswith("### Runnel"):
skip_lines = True
if skip_lines:
continue
else:
readme.append(line)
return "\n".join(readme)
def get_requirements():
requirements = list()
with open(os.path.join(here, "requirements.txt"), "r") as f:
for line in f.read().splitlines():
if not line.startswith("#") and not line.startswith("--"):
requirements.append(line)
return "\n".join(requirements)
setup_options = dict(
name="redis-streams",
version=__version__,
description="Redis Streams client implementation for high availability usage "
"including consumer, monitor and scaler implementation",
long_description=get_readme(),
long_description_content_type="text/markdown",
author="Peter Kiss",
author_email="[email protected]",
url="https://github.com/KissPeter/redis-streams/",
project_urls={
"Documentation": "https://github.com/KissPeter/redis-streams",
"Changes": "https://github.com/KissPeter/redis-streams//releases",
"Code": "https://github.com/KissPeter/redis-streams",
"Issue tracker": "https://github.com/KissPeter/redis-streams//issues",
},
scripts=[],
packages=find_packages(exclude=["redis_streams_test"]),
install_requires=get_requirements(),
license="GNU General Public License v3.0",
classifiers=[ # https://pypi.org/classifiers/
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Communications",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Distributed Computing",
"Natural Language :: English",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
],
python_requires=">=3.6, <4",
package_data={"redis_streams": ["*.py"]},
exclude_package_data={"redis_streams_test": ["*"]},
)
setup(**setup_options)