diff --git a/pyproject.toml b/pyproject.toml index 6773128..b67393f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,15 +1,15 @@ [build-system] -requires = ["setuptools", "setuptools-scm"] -build-backend = "setuptools.build_meta" - -[tool.setuptools.packages.find] -exclude = ["htmlcov"] # Exclude the coverage report file from setuptools package finder +requires = [ + "hatch-vcs", + "hatchling", +] +build-backend = "hatchling.build" [project] name = "wsimod" description = "WSIMOD is for simulating water quality and quantity" readme = "README.md" -version = "0.4.0" +dynamic = [ "version"] license = {file = "LICENSE"} authors = [ { name = "Barnaby Dobson", email = "b.dobson@imperial.ac.uk" }, @@ -61,6 +61,21 @@ doc = [ "wsimod[demos]" ] +[tool.hatch.build] +# Exclude specific files and folders (e.g., `htmlcov` for coverage report) +exclude = ["htmlcov"] + +[tool.hatch.metadata] +license = "BSD-3-clause" # Or your primary license name +license-files = [ "LICENSE"] + +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.hooks.vcs] +version-file = "_version.py" + + [tool.pytest.ini_options] addopts = "-v -p no:warnings --cov=wsimod --cov-report=html"