From 37e9a264c182a83fd483e9ccb1fa59ca4336b43e Mon Sep 17 00:00:00 2001 From: Kentaro Wada Date: Fri, 22 Nov 2024 17:38:48 +0900 Subject: [PATCH] Use importlib.metadata to get the version number in __init__.py --- imgviz/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imgviz/__init__.py b/imgviz/__init__.py index 4f8d3b0..511c67b 100644 --- a/imgviz/__init__.py +++ b/imgviz/__init__.py @@ -1,6 +1,8 @@ # flake8: noqa -__version__ = "1.7.5" +import importlib.metadata + +__version__ = importlib.metadata.version("imgviz") from . import _io as io from . import data