Skip to content

Commit

Permalink
Use importlib.metadata to get version
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <[email protected]>
  • Loading branch information
LecrisUT committed Aug 11, 2023
1 parent 0293623 commit 673522f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ docs/_build
docs/spec
docs/stories
__pycache__
/fmf/_version.py
5 changes: 4 additions & 1 deletion fmf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

from __future__ import annotations

from fmf._version import __version__ # noqa: F401
import importlib.metadata

from fmf.base import Tree
from fmf.context import Context
from fmf.utils import filter

__version__ = importlib.metadata.version("fmf")

__all__ = [
"Context",
"Tree",
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ fmf = 'fmf.cli:cli_entry'
[tool.hatch]
version.source = 'vcs'
version.raw-options.version_scheme = 'post-release'
build.hooks.vcs.version-file = "fmf/_version.py"

[tool.hatch.build.targets.wheel]
packages = ['fmf']
Expand Down

0 comments on commit 673522f

Please sign in to comment.