51 lines
1.5 KiB
Python
51 lines
1.5 KiB
Python
#!/usr/bin/env python3
|
|
import os
|
|
from typing import Tuple
|
|
|
|
import pkg_resources
|
|
from setuptools import find_packages, setup
|
|
|
|
|
|
def read_file(path_segments: Tuple) -> str:
|
|
"""Read a file from the package. Takes a list of strings to join to
|
|
make the path"""
|
|
file_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), *path_segments)
|
|
with open(file_path) as f:
|
|
return f.read()
|
|
|
|
|
|
version = pkg_resources.require("matrix_alertbot")[0].version
|
|
long_description = read_file(("README.md",))
|
|
|
|
|
|
setup(
|
|
name="matrix-alertbot",
|
|
version=version,
|
|
url="https://github.com/anoadragon453/nio-template",
|
|
description="A matrix bot to do amazing things!",
|
|
packages=find_packages(exclude=["tests", "tests.*"]),
|
|
install_requires=[
|
|
"aiohttp>=3.8.1",
|
|
"aiohttp-prometheus-exporter>=0.2.4",
|
|
"aiotools>=1.5.9",
|
|
"diskcache>=5.4.0",
|
|
"matrix-nio>=0.19.0",
|
|
"Markdown>=3.3.7",
|
|
"pytimeparse2>=1.4.0",
|
|
"PyYAML>=6.0",
|
|
"typing-extensions>=4.3.0",
|
|
],
|
|
extras_require={
|
|
"e2e": ["matrix-nio[e2e]>=0.19.0"],
|
|
},
|
|
classifiers=[
|
|
"License :: OSI Approved :: Apache Software License",
|
|
"Programming Language :: Python :: 3 :: Only",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
],
|
|
long_description=long_description,
|
|
long_description_content_type="text/markdown",
|
|
# Allow the user to run the bot with `matrix-alertbot ...`
|
|
scripts=["matrix-alertbot"],
|
|
)
|