forked from pymodbus-dev/pymodbus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
34 lines (27 loc) · 1 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
#!/usr/bin/env python3
"""Installs pymodbus using setuptools."""
# --------------------------------------------------------------------------- #
# initialization
# --------------------------------------------------------------------------- #
from setuptools import setup
dependencies = {}
with open("requirements.txt") as reqs:
option = None
for line in reqs.read().split("\n"):
if 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"]},
)