summaryrefslogtreecommitdiffstats
path: root/gitlint-core/pyproject.toml
diff options
context:
space:
mode:
authorJoris Roovers <joris.roovers@gmail.com>2023-01-18 12:30:39 +0100
committerGitHub <noreply@github.com>2023-01-18 12:30:39 +0100
commitf5e8d97c359e700d5dc9da98be3de2d83bda0689 (patch)
tree467a654fc53aef4a8bb2aef7286c1a4fa279fba3 /gitlint-core/pyproject.toml
parent09d8965da2d0fa865221a27ac1e76a29b3e6ff37 (diff)
Hatch vcs (#410)
Use hatch-vcs for gitlint and gitlint-core versioning. Use a custom build hook in hatch_build.py to ensure the gitlint and gitlint-core versions always match.
Diffstat (limited to 'gitlint-core/pyproject.toml')
-rw-r--r--gitlint-core/pyproject.toml7
1 files changed, 5 insertions, 2 deletions
diff --git a/gitlint-core/pyproject.toml b/gitlint-core/pyproject.toml
index 4f411c1..d6f2276 100644
--- a/gitlint-core/pyproject.toml
+++ b/gitlint-core/pyproject.toml
@@ -1,5 +1,5 @@
[build-system]
-requires = ["hatchling"]
+requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
@@ -35,6 +35,7 @@ classifiers = [
dependencies = [
"arrow>=1",
"Click>=8",
+ "importlib-metadata >= 1.0 ; python_version < \"3.8\"",
"sh>=1.13.0 ; sys_platform != \"win32\"",
]
@@ -54,12 +55,14 @@ Homepage = "https://jorisroovers.github.io/gitlint"
Source = "https://github.com/jorisroovers/gitlint"
[tool.hatch.version]
-path = "gitlint/__init__.py"
+source = "vcs"
+raw-options = { root = ".." }
[tool.hatch.build]
include = [
"/gitlint", #
]
+
exclude = [
"/gitlint/tests", #
]