forked from pymodbus-dev/pymodbus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
36 lines (29 loc) · 1.08 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
#!/usr/bin/env python3
"""Installs pymodbus using setuptools."""
# --------------------------------------------------------------------------- #
# initialization
# --------------------------------------------------------------------------- #
from setuptools import setup
dependencies: dict = {}
with open("requirements.txt") as reqs:
option = None
for line in reqs.read().split("\n"):
if not line:
option = None
elif line.startswith("# install:"):
option = line.split(":")[1]
dependencies[option] = []
elif not line.startswith("#") and option:
dependencies[option].append(line)
install_req = dependencies["required"]
del dependencies["required"]
# --------------------------------------------------------------------------- #
# configuration
# --------------------------------------------------------------------------- #
setup(
install_requires=install_req,
extras_require=dependencies,
package_data={
"pymodbus": ["py.typed", "server/simulator/setup.json", "server/simulator/web/**/*"],
},
)