From 01b5cf06de7c3047a20cab2afe40a479d3583357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexis=20M=C3=A9taireau?= Date: Fri, 5 Apr 2024 15:17:00 +0200 Subject: [PATCH] build: move to `hatch` for packaging --- .gitignore | 3 ++- pyproject.toml | 31 ++++++++++++++++++++++--------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index a68cdae..18d87f6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ venv .env public *.swp -config.yaml \ No newline at end of file +config.yaml +dist diff --git a/pyproject.toml b/pyproject.toml index 6912c4d..92b065a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [build-system] -requires = ["setuptools", "setuptools-scm"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" [project] name = "argos-monitoring" -version = "0.1.0" +dynamic = ["version"] description = "Distributed supervision tool for HTTP." authors = [ { name = "Alexis Métaireau", email = "alexis@notmyidea.org" }, @@ -12,10 +12,12 @@ authors = [ ] readme = "README.md" classifiers = [ - "Programming Language :: Python :: 3.11", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", - "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", + "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", + "Intended Audience :: System Administrators", ] dependencies = [ @@ -49,7 +51,7 @@ dev = [ "respx>=0.20,<1", "ruff==0.1.5,<1", "sphinx-autobuild", - "build>=1.2.1" + "hatch==1.9.4", ] docs = [ "cogapp", @@ -66,9 +68,20 @@ repository = "https://framagit.org/framasoft/framaspace/argos" "Funding" = "https://framasoft.org/en/#support" "Tracker" = "https://framagit.org/framasoft/framaspace/argos/-/issues" -[tool.setuptools] +[tool.hatch.build.targets.sdist] +include = [ + "/argos", + "/docs", + "/tests", +] + +[tool.hatch.build.targets.wheel] packages = ["argos"] +[tool.hatch.version] +path = "argos/__init__.py" + + [project.scripts] argos = "argos.commands:cli"