File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1+ from importlib .metadata import version , PackageNotFoundError
2+
3+ try :
4+ __version__ = version ("conventional-pre-commit" )
5+ except PackageNotFoundError :
6+ # package is not installed
7+ pass
Original file line number Diff line number Diff line change 11[project ]
22name = " conventional_pre_commit"
3- version = " 2.4.0 "
3+ dynamic = [ " version " ]
44description = " A pre-commit hook that checks commit messages for Conventional Commits formatting."
55readme = " README.md"
66license = { file = " LICENSE" }
@@ -24,13 +24,14 @@ dev = [
2424 " flake8" ,
2525 " pre-commit" ,
2626 " pytest" ,
27+ " setuptools_scm" ,
2728]
2829
2930[project .scripts ]
3031conventional-pre-commit = " conventional_pre_commit.hook:main"
3132
3233[build-system ]
33- requires = [" setuptools>=64 " , " wheel " ]
34+ requires = [" setuptools>=65 " , " setuptools-scm>=8 " ]
3435build-backend = " setuptools.build_meta"
3536
3637[tool .black ]
@@ -51,3 +52,6 @@ norecursedirs = [
5152 " .pytest_cache" ,
5253 " .vscode" ,
5354]
55+
56+ [tool .setuptools_scm ]
57+ # intentionally left blank, but we need the section header to activate the tool
You can’t perform that action at this time.
0 commit comments