diff options
Diffstat (limited to 'gitlint-core')
-rw-r--r-- | gitlint-core/gitlint/__init__.py | 9 | ||||
-rw-r--r-- | gitlint-core/pyproject.toml | 7 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gitlint-core/gitlint/__init__.py b/gitlint-core/gitlint/__init__.py index 959b7af..d08993f 100644 --- a/gitlint-core/gitlint/__init__.py +++ b/gitlint-core/gitlint/__init__.py @@ -1 +1,8 @@ -__version__ = "0.19.0.dev3" +import sys + +if sys.version_info >= (3, 8): + from importlib import metadata +else: + import importlib_metadata as metadata + +__version__ = metadata.version("gitlint-core") 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", # ] |