This repository has been archived by the owner on May 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
60 lines (51 loc) · 1.89 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
import os
import re
import setuptools # type: ignore
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
init_py = os.path.join(os.path.dirname(__file__), "jarpc", "__init__.py")
with open(init_py) as f:
cont = f.read()
str_regex = r"['\"]([^'\"]*)['\"]"
try:
version = re.findall(rf"^__version__ = {str_regex}$", cont, re.MULTILINE)[0]
except IndexError:
raise RuntimeError(f"Unable to find version in {init_py}")
try:
author = re.findall(rf"^__author__ = {str_regex}$", cont, re.MULTILINE)[0]
except IndexError:
raise RuntimeError(f"Unable to find author in {init_py}")
install_requires = ["aioredis<2.0"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Operating System :: OS Independent",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Natural Language :: English",
"Topic :: Software Development :: Object Brokering",
"Typing :: Typed",
]
setuptools.setup(
name="jarpc",
version=version,
author=author,
author_email="[email protected]",
description="RPC over redis communication library",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/IOMirea/jarpc",
install_requires=install_requires,
python_requires=">=3.7",
packages=setuptools.find_packages(),
package_data={"jarpc": ["py.typed"]},
license="GPLv3",
classifiers=classifiers,
)