-
-
Notifications
You must be signed in to change notification settings - Fork 177
/
setup.py
74 lines (61 loc) · 2.24 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
import setuptools
from mautrix_telegram.get_version import git_tag, git_revision, version, linkified_version
with open("requirements.txt") as reqs:
install_requires = reqs.read().splitlines()
with open("optional-requirements.txt") as reqs:
extras_require = {}
current = []
for line in reqs.read().splitlines():
if line.startswith("#/"):
extras_require[line[2:]] = current = []
elif not line or line.startswith("#"):
continue
else:
current.append(line)
extras_require["all"] = list({dep for deps in extras_require.values() for dep in deps})
try:
long_desc = open("README.md").read()
except IOError:
long_desc = "Failed to read README.md"
with open("mautrix_telegram/version.py", "w") as version_file:
version_file.write(f"""# Generated in setup.py
git_tag = {git_tag!r}
git_revision = {git_revision!r}
version = {version!r}
linkified_version = {linkified_version!r}
""")
setuptools.setup(
name="mautrix-telegram",
version=version,
url="https://github.com/mautrix/telegram",
project_urls={
"Changelog": "https://github.com/mautrix/telegram/blob/master/CHANGELOG.md",
},
author="Tulir Asokan",
author_email="[email protected]",
description="A Matrix-Telegram hybrid puppeting/relaybot bridge.",
long_description=long_desc,
long_description_content_type="text/markdown",
packages=setuptools.find_packages(),
install_requires=install_requires,
extras_require=extras_require,
python_requires="~=3.10",
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Topic :: Communications :: Chat",
"Framework :: AsyncIO",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
package_data={"mautrix_telegram": [
"web/public/*.mako", "web/public/*.png", "web/public/*.css",
"example-config.yaml", "unicodemojipack.pickle",
]},
data_files=[
(".", ["mautrix_telegram/example-config.yaml"]),
],
)