-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
44 lines (40 loc) · 1.27 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
"""
Installation configuration.
"""
import os
import json
import setuptools
# Fetch the root folder to specify absolute paths to the "include" files
ASSETS_DIR = os.path.join(os.path.normpath(os.path.dirname(__file__)), "raspberry_pi", "assets")
# Specify which files should be added to the installation
PACKAGE_DATA = [
os.path.join(ASSETS_DIR, "metadata.json"),
os.path.join(ASSETS_DIR, "log-config.json"),
os.path.join(ASSETS_DIR, "log", ".keep")
]
with open(os.path.join(ASSETS_DIR, "metadata.json")) as f:
metadata = json.load(f)
setuptools.setup(
name=metadata["__title__"],
description=metadata["__description__"],
version=metadata["__version__"],
author=metadata["__lead__"],
author_email=metadata["__email__"],
maintainer=metadata["__lead__"],
maintainer_email=metadata["__email__"],
url=metadata["__url__"],
packages=setuptools.find_namespace_packages(),
package_data={"raspberry_pi": PACKAGE_DATA},
include_package_data=True,
classifiers=[
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.6",
],
install_requires=[
"python-dotenv",
"msgpack",
"pyserial"
],
python_requires=">=3.6",
)