forked from languitar/autosuspend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
72 lines (60 loc) · 1.64 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
import os
import os.path
from setuptools import find_packages, setup
name = 'autosuspend'
with open(os.path.join(
os.path.abspath(os.path.dirname(os.path.realpath(__file__))),
'VERSION'), 'r') as version_file:
lines = version_file.readlines()
release = lines[1].strip()
extras_require = {
'Mpd': ['python-mpd2'],
'Kodi': ['requests'],
'XPath': ['lxml', 'requests'],
'Logind': ['dbus-python'],
'ical': ['requests', 'icalendar', 'python-dateutil', 'tzlocal'],
'localfiles': ['requests-file'],
'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},
)
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']),
],
)