From 94bb19d7013c93cd034e3f0d12e7dab80091e36f Mon Sep 17 00:00:00 2001 From: theOehrly <23384863+theOehrly@users.noreply.github.com> Date: Thu, 28 Dec 2023 13:43:36 +0100 Subject: [PATCH] trial hatchling build backend --- pyproject.toml | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b7595ea08..d7d967a03 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,17 +32,39 @@ dependencies = [ "Documentation" = "https://docs.fastf1.dev" [build-system] -requires = ["setuptools", "setuptools-scm"] -build-backend = "setuptools.build_meta" +requires = ["hatchling", "hatch-vcs"] +build-backend = "hatchling.build" -[tool.setuptools.packages.find] -where = [""] -include = ["fastf1*"] -exclude = ["fastf1/testing*"] -namespaces = false +[tool.hatch.version] +source = "vcs" -[tool.setuptools_scm] -version_file = "fastf1/_version.py" +[tool.hatch.build.targets.wheel] +ignore-vcs = true +include = [ + "fastf1/**", +] +exclude = [ + "fastf1/tests/**", + "fastf1/testing/**", +] + +[tool.hatch.build.targets.sdist] +ignore-vcs = true +include = [ + "fastf1/**", + "requirements/**", + "examples/**" +] +exclude = [ + "fastf1/tests/**", + "fastf1/testing/**", +] + +[tool.hatch.build.hooks.vcs] +version-file = "fastf1/_version.py" + +[tool.hatch.version.raw-options] +## configures setuptools_scm within the hatchling build backend version_scheme = "release-branch-semver" local_scheme = "node-and-date" fallback_version = "0.0+UNKNOWN"