This repository has been archived by the owner on Nov 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
setup.py
executable file
·75 lines (64 loc) · 2.59 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
#!/usr/bin/env python
import os
from os import walk
from setuptools import find_packages
from setuptools import setup
def get_data_files():
data_files = []
for path, _dirs, files in walk("share"):
target_path = os.path.join("/usr", path)
if files:
data_files.append((target_path, [os.path.join(path, f) for f in files]))
# Install all icons for the package into /usr/share as well.
# This is because the .desktop file actually uses them too.
for path, _dirs, files in walk("caffeine/assets/icons"):
target_path = os.path.join("/usr/share", path[16:])
if files:
data_files.append((target_path, [os.path.join(path, f) for f in files]))
data_files.append(("/etc/xdg/autostart", ["share/applications/caffeine.desktop"]))
return data_files
if __name__ == "__main__":
setup(
name="caffeine-ng",
use_scm_version={
"version_scheme": "post-release",
"write_to": "caffeine/version.py",
},
description=("Tray bar app to temporarily inhibit screensaver and sleep mode."),
long_description=open("README.rst").read(),
author="The Caffeine Developers",
author_email="[email protected]",
maintainer="Hugo Osvaldo Barrera",
maintainer_email="[email protected]",
url="https://github.com/caffeine-ng/caffeine-ng",
packages=find_packages(),
include_package_data=True,
data_files=get_data_files(),
install_requires=[
"click>=7.1,<8.0",
"ewmh>=0.1.4",
"pyxdg>=0.25",
"setproctitle>=1.1.10",
"wheel>=0.29.0",
"pulsectl",
"pygobject>=3.1.1,<4.0",
],
# `console_scripts` is the same as `gui_scripts`.
entry_points={"gui_scripts": ["caffeine = caffeine.cli:cli"]},
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: X11 Applications",
"Environment :: X11 Applications :: GTK",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: POSIX",
"Operating System :: POSIX :: BSD",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
setup_requires=["setuptools_scm"],
)