Skip to content

Commit 58b07de

Browse files
committed
refact: use importlib for strkit version
1 parent 32a9d6d commit 58b07de

3 files changed

Lines changed: 2 additions & 5 deletions

File tree

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
include strkit/VERSION
21
include strkit/data/ploidy_configs/*.json
32
include strkit/viz/static/logo.png
43
include strkit/viz/templates/*.html

strkit/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

strkit/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
from pathlib import Path
1+
from importlib.metadata import version
22

33
__all__ = [
44
"__version__",
55
]
66

7-
with open(Path(__file__).parent / "VERSION", "r") as vf:
8-
__version__ = vf.read().strip()
7+
__version__ = version("strkit")

0 commit comments

Comments
 (0)