generated from duckietown/template-library
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
81 lines (69 loc) · 2.14 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
from setuptools import find_packages, setup
# :==> Fill in your project data here
package_name = "duckietown-messages"
library_webpage = "https://github.com/duckietown/duckietown-messages"
maintainer = "Andrea F. Daniele"
maintainer_email = "afdaniele@duckietown.com"
short_description = "Duckietown messages for the DTPS middleware"
full_description = """
Duckietown messages for the DTPS middleware
"""
if "<" in package_name:
msg = "Please fill in the project data in setup.py."
raise ValueError(msg)
# Read version from the __init__ file
def get_version_from_source(filename):
import ast
v = None
with open(filename) as f:
for line in f:
if line.startswith("__version__"):
v = ast.parse(line).body[0].value.s
break
else:
raise ValueError("No version found in %r." % filename)
if v is None:
raise ValueError(filename)
return v
version = get_version_from_source("src/duckietown_messages/__init__.py")
# read project dependencies
# NO - dependencies.txt is for testing dependiences - EVERYTHING PINNED
# The requirements here must be broad.
# dependencies_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'dependencies.txt')
# with open(dependencies_file, 'rt') as fin:
# dependencies = list(filter(lambda line: not line.startswith('#'), fin.read().splitlines()))
install_requires = [
"pydantic",
"numpy",
"pyturbojpeg",
"Pillow",
"pytransform3d"
]
tests_require = []
# compile description
underline = "=" * (len(package_name) + len(short_description) + 2)
description = """
{name}: {short}
{underline}
{long}
""".format(
name=package_name,
short=short_description,
long=full_description,
underline=underline,
)
console_scripts = []
# setup package
setup(
name=package_name,
author=maintainer,
author_email=maintainer_email,
url=library_webpage,
tests_require=tests_require,
install_requires=install_requires,
package_dir={"": "src"},
packages=find_packages("./src"),
long_description=description,
version=version,
entry_points={"console_scripts": console_scripts},
)