-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
64 lines (53 loc) · 1.76 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
import setuptools
def run():
setuptools.setup(
name='desklank',
version = findversion('.', 'desklank'),
author='LANNOCC (Shawn A. Wilson)',
author_email='[email protected]',
url='https://github.com/lannocc/desklank',
packages=setuptools.find_packages(),
description='Text-mode peer-to-peer encrypted communication utilizing' \
+ ' LANK protocol and DeskApp framework',
long_description_content_type='text/markdown',
long_description=open('README.md').read(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
install_requires=[
'appdirs',
'beepy',
'deskapp >= 0.0.4',
'lank >= 0.4.7',
'pillow',
'pystray',
'requests',
],
entry_points = {
'console_scripts': [
'desklank=desklank.__main__:run',
],
},
include_package_data=True,
#data_files = [
# ('share/applications', ['com.lannocc.desklank.desktop']),
#],
)
def findversion(root, name):
'''versioning strategy taken from
http://stackoverflow.com/a/7071358/7203060'''
import re
from os.path import join
vfile = join(root, name, "__version__.py")
vmatch = re.search(r'^__version__ *= *["\']([^"\']*)["\']',
open(vfile, "rt").read(), re.M)
if vmatch:
version = vmatch.group(1)
print ("Found %s version %s" % (name, version))
return version
else:
raise RuntimeError("Expecting a version string in %s." % (vfile))
if __name__ == '__main__':
run()