forked from DaveDavenport/Rofication
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathsetup.py
56 lines (45 loc) · 1.54 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
import re
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def read_metadata():
name = version = url = None
with open('rofication/_metadata.py') as fp:
for match in re.finditer(r"^(ROFICATION_\w+?)\s*=\s*['\"](.*?)['\"]$", fp.read(), re.MULTILINE):
var, value = match.groups()
if var == 'ROFICATION_NAME':
name = value
elif var == 'ROFICATION_VERSION':
version = value
elif var == 'ROFICATION_URL':
url = value
if name is None or version is None or url is None:
raise RuntimeError('unable to read package metadata')
return name, version, url
NAME, VERSION, URL = read_metadata()
DESCRIPTION = 'Notification system that provides a Rofi front-end'
REQUIRED_PYTHON_VERSION = '>=3.6.0'
LICENSE = 'MIT'
CLASSIFIERS = [
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython'
]
REQUIRED = ['PyGObject>=3.26.1', 'dbus-python>=1.2.6']
PACKAGES = ['rofication', 'rofication.resources']
SCRIPTS = ['rofication-daemon', 'rofication-gui', 'rofication-status']
setup(
name=NAME,
description=DESCRIPTION,
version=VERSION,
python_requires=REQUIRED_PYTHON_VERSION,
packages=PACKAGES,
scripts=SCRIPTS,
url=URL,
install_requires=REQUIRED,
license=LICENSE,
classifiers=CLASSIFIERS,
)