-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathsetup.py
69 lines (63 loc) · 1.75 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
from pathlib import Path
from setuptools import find_packages, setup
name = "autosuspend"
version_file = Path(__file__).absolute().parent / "VERSION"
lines = version_file.read_text().splitlines()
release = lines[1].strip()
extras_require = {
"Mpd": ["python-mpd2"],
"Kodi": ["requests"],
"XPath": ["lxml", "requests"],
"JSONPath": ["jsonpath-ng", "requests"],
"Logind": ["dbus-python"],
"ical": ["requests", "icalendar", "python-dateutil", "tzlocal"],
"localfiles": ["requests-file"],
"logactivity": ["python-dateutil", "pytz"],
"test": [
"pytest",
"pytest-cov",
"pytest-mock",
"freezegun",
"python-dbusmock",
"PyGObject",
"pytest-datadir",
"pytest-httpserver",
],
}
extras_require["test"].extend(
{dep for k, v in extras_require.items() if k != "test" for dep in v},
)
extras_require["all"] = list(
{dep for k, v in extras_require.items() if k != "test" for dep in v},
)
setup(
name=name,
version=release,
description="A daemon to suspend your server in case of inactivity",
author="Johannes Wienke",
author_email="[email protected]",
license="GPL2",
zip_safe=False,
python_requires=">=3.7",
install_requires=[
"psutil>=5.0",
"portalocker",
],
extras_require=extras_require,
package_dir={
"": "src",
},
packages=find_packages("src"),
entry_points={
"console_scripts": [
"autosuspend = autosuspend:main",
],
},
data_files=[
("etc", ["data/autosuspend.conf", "data/autosuspend-logging.conf"]),
(
"lib/systemd/system",
["data/autosuspend.service", "data/autosuspend-detect-suspend.service"],
),
],
)