From 061cf690a79d4af1c2e6f673b3e31257103e8c71 Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Thu, 22 May 2025 10:40:24 +0100 Subject: [PATCH 1/2] Switch build system to hatch and add json files to sdist and wheel This should be possible with setuptools but I followed their docs and it didn't work as I expected. --- pyproject.toml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c4cc5131..ca91d502 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "labthings-fastapi" -version = "0.0.8" +version = "0.0.9" authors = [ { name="Richard Bowman", email="richard.bowman@cantab.net" }, ] @@ -39,8 +39,17 @@ server = [ "Bug Tracker" = "https://github.com/rwb27/labthings-fastapi/issues" [build-system] -requires = ["setuptools>=61.0"] -build-backend = "setuptools.build_meta" +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.hatch.build.targets.sdist] +include = [ + "src" +] +artifacts = ["src/*.json"] + +[tool.hatch.build.targets.wheel] +artifacts = ["src/*.json"] [tool.ruff] target-version = "py39" From 992deb29abfd37b6148aa049b87f65bb8ced398b Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Mon, 9 Jun 2025 11:35:06 +0100 Subject: [PATCH 2/2] Update ruff taget version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ca91d502..b9be87eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ artifacts = ["src/*.json"] artifacts = ["src/*.json"] [tool.ruff] -target-version = "py39" +target-version = "py310" [tool.mypy] plugins = ["pydantic.mypy", "numpy.typing.mypy_plugin"]