From c67b26760b1c7b4ef70bad9e0a1819de625728d5 Mon Sep 17 00:00:00 2001 From: Izalia Mae Date: Mon, 1 Apr 2024 15:38:29 -0400 Subject: [PATCH] convert setup.cfg to pyproject.toml --- pyproject.toml | 56 ++++++++++++++++++++++++++++++++++++++++++++++++-- setup.cfg | 51 --------------------------------------------- setup.py | 4 ---- tox.ini | 6 ++++++ 4 files changed, 60 insertions(+), 57 deletions(-) delete mode 100644 setup.cfg delete mode 100644 setup.py create mode 100644 tox.ini diff --git a/pyproject.toml b/pyproject.toml index b1bde52..805e24a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,59 @@ [build-system] -requires = ["setuptools","wheel"] -build-backend = 'setuptools.build_meta' +requires = ["setuptools>=61.2"] +build-backend = "setuptools.build_meta" +[project] +name = "ActivityRelay" +description = "Generic LitePub relay (works with all LitePub consumers and Mastodon)" +license = {text = "AGPLv3"} +classifiers = [ + "Environment :: Console", + "License :: OSI Approved :: GNU Affero General Public License v3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] +requires-python = ">=3.8" +dynamic = ["version", "dependencies", "optional-dependencies"] + +[project.readme] +file = "README.md" +content-type = "text/markdown; charset=UTF-8" + +[project.urls] +Documentation = "https://git.pleroma.social/pleroma/relay/-/blob/main/docs/index.md" +Source = "https://git.pleroma.social/pleroma/relay" +Tracker = "https://git.pleroma.social/pleroma/relay/-/issues" + +[project.scripts] +activityrelay = "relay.manage:main" + +[tool.setuptools] +zip-safe = false +packages = [ + "relay", + "relay.database", + "relay.views", +] +include-package-data = true +license-files = ["LICENSE"] + +[tool.setuptools.package-data] +relay = [ + "data/*", + "frontend/*", + "frontend/page/*", + "frontend/static/*" +] + +[tool.setuptools.dynamic] +version = {attr = "relay.__version__"} +dependencies = {file = ["requirements.txt"]} + +[tool.setuptools.dynamic.optional-dependencies] +dev = {file = ["dev-requirements.txt"]} [tool.mypy] show_traceback = true diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index e0828bb..0000000 --- a/setup.cfg +++ /dev/null @@ -1,51 +0,0 @@ -[metadata] -name = ActivityRelay -version = attr: relay.__version__ -description = Generic LitePub relay (works with all LitePub consumers and Mastodon) -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8 -url = https://git.pleroma.social/pleroma/relay -license = AGPLv3 -license_file = LICENSE -classifiers = - Environment :: Console - License :: OSI Approved :: GNU Affero General Public License v3 - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 -project_urls = - Source = https://git.pleroma.social/pleroma/relay - Tracker = https://git.pleroma.social/pleroma/relay/-/issues - -[options] -zip_safe = False -packages = - relay - relay.database - relay.views -include_package_data = true -install_requires = file: requirements.txt -python_requires = >=3.8 - -[options.extras_require] -dev = file: dev-requirements.txt - -[options.package_data] -relay = - data/* - frontend/* - frontend/page/* - -[options.entry_points] -console_scripts = - activityrelay = relay.manage:main - - -[flake8] -extend-ignore = E128,E251,E261,E303,W191 -max-line-length = 100 -indent-size = 4 -per-file-ignores = - __init__.py: F401 diff --git a/setup.py b/setup.py deleted file mode 100644 index 1abbd06..0000000 --- a/setup.py +++ /dev/null @@ -1,4 +0,0 @@ -import setuptools - -if __name__ == "__main__": - setuptools.setup() diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..e887d18 --- /dev/null +++ b/tox.ini @@ -0,0 +1,6 @@ +[flake8] +extend-ignore = E128,E251,E261,E303,W191 +max-line-length = 100 +indent-size = 4 +per-file-ignores = + __init__.py: F401