forked from buzz/twitch-indicator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·47 lines (43 loc) · 1.53 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
#!/usr/bin/env python3
"""setup.py for twitch-indicator"""
import re
from setuptools import find_packages, setup
# parse version (setup.py should not import module!)
def get_version():
"""Get version using regex parsing."""
versionfile = "twitch_indicator/constants.py"
with open(versionfile, "rt") as file:
version_file_content = file.read()
match = re.search(r"^VERSION = ['\"]([^'\"]*)['\"]", version_file_content, re.M)
if match:
return match.group(1)
raise RuntimeError(f"Unable to find version string in {versionfile}.")
setup(
name="twitch-indicator",
version=get_version(),
description=(
"Twitch.tv indicator for Linux. "
"Tracks your followed channels and notifies when they go live."
),
author="buzz",
author_email="[email protected]",
license="GPLv2",
url="https://github.com/buzz/twitch-indicator",
packages=find_packages(),
entry_points={
"console_scripts": [
"twitch-indicator-auth = twitch_indicator.auth_script:main"
],
"gui_scripts": ["twitch-indicator = twitch_indicator.__main__:main"],
},
data_files=[
(
"share/applications",
["data/twitch-indicator.desktop", "data/twitch-indicator-auth.desktop"],
),
("share/icons", ["twitch_indicator/data/twitch-indicator.svg"]),
("share/glib-2.0/schemas", ["data/apps.twitch-indicator.gschema.xml"]),
],
package_data={"twitch_indicator": ["data/*"]},
install_requires=["PyGObject"],
)