forked from psaavedra/matrix-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·73 lines (62 loc) · 1.72 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
from setuptools import setup, find_packages
import os
here = os.path.abspath(os.path.dirname(__file__))
def read_file(path_segments):
"""Read a file from the package. Takes a list of strings to join to
make the path"""
file_path = os.path.join(here, *path_segments)
with open(file_path) as f:
return f.read()
def exec_file(path_segments):
"""Execute a single python file to get
the variables defined in it"""
result = {}
code = read_file(path_segments)
exec(code, result)
return result
version = exec_file(("matrixbot", "__init__.py"))["__version__"]
long_description = ""
try:
long_description = file('README.md').read()
except Exception:
pass
license = ""
try:
license = file('LICENSE').read()
except Exception:
pass
setup(
name='matrix-bot',
version=version,
description='A matrix.org bot',
author='Pablo Saavedra',
author_email='saavedra.pablo@gmail.com',
url='http://github.com/psaavedra/matrix-bot',
packages=find_packages(),
package_data={
},
scripts=[
"tools/matrix-bot",
"tools/matrix-subscriber",
],
zip_safe=False,
install_requires=[
"getconf",
"matrix-client",
"python-ldap",
],
data_files=[
('/usr/share/doc/matrix-bot/',
['cfg/matrix-bot.cfg.example']),
],
download_url='https://github.com/psaavedra/matrix-bot/zipball/master',
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Topic :: Communications :: Chat",
],
long_description=long_description,
license=license,
keywords="python matrix bot matrix-python-sdk",
)