-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
38 lines (30 loc) · 970 Bytes
/
setup.py
File metadata and controls
38 lines (30 loc) · 970 Bytes
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
import setuptools
def main() -> None:
setuptools.setup(
name="enapter",
version=read_version(),
long_description=read_file("README.md"),
long_description_content_type="text/markdown",
description="Enapter Python SDK",
packages=setuptools.find_packages("src"),
package_dir={"": "src"},
url="https://github.com/Enapter/python-sdk",
author="Roman Novatorov",
author_email="rnovatorov@enapter.com",
install_requires=[
"aiomqtt==2.5.*",
"dnspython==2.8.*",
"json-log-formatter==1.1.*",
"httpx==0.28.*",
],
)
def read_version() -> str:
with open("src/enapter/__init__.py") as f:
local_scope: dict = {}
exec(f.readline(), {}, local_scope)
return local_scope["__version__"]
def read_file(name) -> str:
with open(name) as f:
return f.read()
if __name__ == "__main__":
main()