From 0e3f209c3ba8469ad730fc36a9e50846e0d6d529 Mon Sep 17 00:00:00 2001 From: Martin Lang Date: Fri, 6 Oct 2023 11:54:52 +0200 Subject: [PATCH] chore: switch from deprecated pkg_resources to importlib.metadata --- micromagneticdata/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/micromagneticdata/__init__.py b/micromagneticdata/__init__.py index d92e2b4..336e3c9 100644 --- a/micromagneticdata/__init__.py +++ b/micromagneticdata/__init__.py @@ -1,5 +1,6 @@ """Analyse micromagnetic data.""" -import pkg_resources +import importlib.metadata + import pytest from .abstract_drive import AbstractDrive @@ -9,7 +10,7 @@ from .mumax3drive import Mumax3Drive from .oommfdrive import OOMMFDrive -__version__ = pkg_resources.get_distribution(__name__).version +__version__ = importlib.metadata.version(__package__) def test():