diff --git a/pyproject.toml b/pyproject.toml index 7b1a118..3d7e779 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build>=0.12,<0.13"] +build-backend = "uv_build" [project] name = "clevercloud-sdk" @@ -8,6 +8,9 @@ version = "0.2.0" description = "Python SDK for Clever Cloud" readme = "README.md" license = "Apache-2.0" +# Explicit: unlike hatchling, uv_build does not ship the licence file unless +# it is listed, and Apache-2.0 requires redistributing it with the work. +license-files = ["LICENSE"] requires-python = ">=3.11" authors = [ { name = "David LEGRAND", email = "david.legrand@clever.cloud" } @@ -44,15 +47,11 @@ Documentation = "https://github.com/CleverCloud/clevercloud-sdk-python#readme" Repository = "https://github.com/CleverCloud/clevercloud-sdk-python" Issues = "https://github.com/CleverCloud/clevercloud-sdk-python/issues" -[tool.hatch.build.targets.sdist] -include = [ - "/src", - "/tests", - "/CHANGELOG.md", -] - -[tool.hatch.build.targets.wheel] -packages = ["src/clever_cloud"] +[tool.uv.build-backend] +# The distribution is named clevercloud-sdk but the module is clever_cloud, +# which uv_build cannot derive from the project name. +module-name = "clever_cloud" +source-include = ["tests/**", "CHANGELOG.md"] [tool.pytest.ini_options] testpaths = ["tests"]