-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
36 lines (31 loc) · 1.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
35
36
import setuptools
from pip._internal.req import parse_requirements
from ros2_graph import __version__
with open("README.md") as readme:
lines = readme.readlines()
start = lines.index("```mermaid\n")
end = lines.index("```\n", start)
lines = (
lines[:start]
+ [
"![](https://github.com/kiwicampus/ros2_graph/raw/main/images/turtle_graph.png)\n"
]
+ lines[end + 1 :]
)
long_description = "".join(lines)
install_reqs = list(parse_requirements("requirements.txt", session=False))
try:
requirements = [str(ir.req) for ir in install_reqs]
except:
requirements = [str(ir.requirement) for ir in install_reqs]
setuptools.setup(
name="ros2_graph",
version=__version__,
url="https://github.com/kiwicampus/ros2_graph",
description="Generate mermaid description of ROS2 graphs to add on your markdown files.",
long_description=long_description,
long_description_content_type="text/markdown",
packages=["ros2_graph"],
install_requires=requirements,
entry_points={"console_scripts": ["ros2_graph = ros2_graph:__main__.main"]},
)