1
0
Fork 0

Added packaging (via Flit)

This commit is contained in:
Anna “CyberTailor” 2023-05-08 19:04:32 +05:00
parent d761cf5951
commit 9ed31cc5c8
No known key found for this signature in database
GPG Key ID: E7B76EDC50864BB1
3 changed files with 43 additions and 5 deletions

View File

@ -26,6 +26,9 @@ from mastoposter.integrations import (
)
from mastoposter.types import Status
__version__ = "0"
__description__ = "Mastodon to [anything] reposter"
logger = getLogger()

View File

@ -23,7 +23,7 @@ from logging import (
getLevelName,
getLogger,
)
from sys import stdout
from sys import argv, stdout
from mastoposter import execute_integrations, load_integrations_from
from mastoposter.integrations import FilteredIntegration
from mastoposter.sources import websocket_source
@ -95,7 +95,7 @@ async def listen(
await execute_integrations(status, drains)
def main(config_path: str):
def main(config_path: str = argv[1]):
conf = ConfigParser(interpolation=ExtendedInterpolation())
conf.read(config_path)
@ -137,6 +137,4 @@ def main(config_path: str):
if __name__ == "__main__":
from sys import argv
main(argv[1])
main()

37
pyproject.toml Normal file
View File

@ -0,0 +1,37 @@
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[project]
name = "mastoposter"
authors = [
{name = "hatkidchan", email = "hatkidchan@gmail.com"}
]
readme = "README.md"
license = {file = "LICENSE"}
classifiers = [
"Environment :: No Input/Output (Daemon)",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
"Topic :: Communications",
"Topic :: Internet :: WWW/HTTP"
]
keywords = ["mastodon", "discord", "telegram"]
requires-python = ">=3.7"
dependencies = [
"Jinja2",
"beautifulsoup4",
"emoji",
"httpx",
"websockets"
]
dynamic = ["version", "description"]
[project.urls]
Source = "https://github.com/hatkidchan/mastoposter"
[project.scripts]
mastoposter = "mastoposter.__main__:main"
[tool.flit.sdist]
include = ["config.ini"]