File: setup.py

package info (click to toggle)
autosuspend 9.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,196 kB
  • sloc: python: 5,431; xml: 13; makefile: 10; javascript: 1
file content (58 lines) | stat: -rw-r--r-- 1,534 bytes parent folder | download
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
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", "tzdata"],
    "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="languitar@semipol.de",
    license="GPL2",
    zip_safe=False,
    python_requires=">=3.11",
    install_requires=[
        "psutil>=5.0",
        "portalocker",
    ],
    extras_require=extras_require,
    package_dir={"": "src"},
    packages=find_packages("src"),
    entry_points={
        "console_scripts": [
            "autosuspend = autosuspend:main",
        ],
    },
)