-
Notifications
You must be signed in to change notification settings - Fork 12
/
setup.py
98 lines (93 loc) · 3.66 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/usr/bin/env python
import os
from setuptools import setup, find_packages
repo_base_dir = os.path.abspath(os.path.dirname(__file__))
# pull in the packages metadata
package_about = {}
with open(os.path.join(repo_base_dir, "src", "cobald", "__about__.py")) as about_file:
exec(about_file.read(), package_about)
with open(os.path.join(repo_base_dir, "README.rst"), "r") as README:
long_description = README.read()
TESTS_REQUIRE = ["pytest>=4.3.0", "pytest-timeout", "exceptiongroup"]
if __name__ == "__main__":
setup(
name=package_about["__title__"],
version=package_about["__version__"],
description=package_about["__summary__"],
long_description=long_description.strip(),
author=package_about["__author__"],
author_email=package_about["__email__"],
url=package_about["__url__"],
# >>> Source Code to distribute
# root location for packages
package_dir={"": "src"},
# the 'cobald' top-level is not a namespace package,
# we must explicitly point to it
packages=[
"cobald.%s" % pkg
for pkg in find_packages(os.path.join(repo_base_dir, "src", "cobald"))
]
+ ["cobald"],
py_modules=["cobald.__about__"],
entry_points={
"console_scripts": ["cobald = cobald.daemon.core.main:cli_run"],
"cobald.config.yaml_constructors": [
"%s = %s:%s" % (name, module, name)
for name, module in (
("LinearController", "cobald.controller.linear"),
("RelativeSupplyController", "cobald.controller.relative_supply"),
("Buffer", "cobald.decorator.buffer"),
("Limiter", "cobald.decorator.limiter"),
("Logger", "cobald.decorator.logger"),
("Standardiser", "cobald.decorator.standardiser"),
("__yaml_tag_test", "cobald.daemon.plugins"),
)
],
"cobald.config.sections": [
"pipeline = cobald.daemon.core.config:load_pipeline",
"__config_test = builtins:dict",
],
},
# >>> Dependencies
python_requires=">=3.8",
install_requires=[
"pyyaml",
"trio",
"entrypoints",
"toposort",
],
extras_require={
"docs": ["sphinx", "sphinx_rtd_theme"],
"test": TESTS_REQUIRE,
"contrib": [
"flake8",
"flake8-bugbear",
"black; implementation_name=='cpython'",
"pytest>=8.0",
"pytest-cov",
]
+ TESTS_REQUIRE,
},
# metadata for package search
license="MIT",
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Science/Research",
"Intended Audience :: System Administrators",
"Topic :: Adaptive Technologies",
"Topic :: Office/Business :: Scheduling",
"Topic :: System :: Distributed Computing",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
],
keywords=package_about["__keywords__"],
# unit tests
setup_requires=["pytest-runner"],
test_suite="cobald_tests",
tests_require=TESTS_REQUIRE,
)