Skip to content

Commit

Permalink
use hatch-vcs for versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
odrling committed Jan 16, 2024
1 parent d07b8e3 commit f5fefff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,5 @@ target/
.envrc

.direnv

peony/_version.py
2 changes: 1 addition & 1 deletion peony/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""

__version__ = "3.0.0"
from ._version import __version__, __version_tuple__ # type: ignore

import logging

Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
Expand Down Expand Up @@ -69,7 +69,10 @@ Repository = "https://github.com/odrling/peony-twitter.git"
Issues = "https://github.com/odrling/peony-twitter/issues"

[tool.hatch.version]
path = "peony/__init__.py"
source = "vcs"

[tool.hatch.build.hooks.vcs]
version-file = "_version.py"

[tool.hatch.build.targets.sdist]
include = [
Expand Down

0 comments on commit f5fefff

Please sign in to comment.