Merge pull request #10 from eigenmagic/package

Package tool for PyPI/pip distribution.
This commit is contained in:
Justin Warren 2023-01-10 08:55:15 +11:00 committed by GitHub
commit 9b187807e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 3 deletions

38
pyproject.toml Normal file
View File

@ -0,0 +1,38 @@
[project]
name = "fediblockhole"
version = "0.2.1"
description = "Federated blocklist management for Mastodon"
readme = "README.md"
license = {file = "LICENSE"}
requires-python = ">=3.6"
keywords = ["mastodon", "fediblock"]
authors = [
{name = "Justin Warren"}, {email = "justin@eigenmagic.com"}
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: GNU Affero General Public License v3",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
]
dependencies = [
"requests",
"toml"
]
[project.urls]
homepage = "https://github.com/eigenmagic/fediblockhole"
documentation = "https://github.com/eigenmagic/fediblockhole"
repository = "https://github.com/eigenmagic/fediblockhole"
[project.scripts]
fediblock-sync = "fediblockhole:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
# requires = ["flit_core >=3.4,<4"]
# build-backend = "flit_core.buildapi"

View File

@ -1,5 +1,5 @@
#!/usr/bin/python3
# Export and import blocklists via API
"""A tool for managing federated Mastodon blocklists
"""
import argparse
import toml
@ -571,7 +571,7 @@ def str2bool(boolstring: str) -> bool:
else:
raise ValueError(f"Cannot parse value '{boolstring}' as boolean")
if __name__ == '__main__':
def main():
ap = argparse.ArgumentParser(description="Bulk blocklist tool",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)