From a89d1725066d665d66ab9bbedc4186beac04d26f Mon Sep 17 00:00:00 2001 From: Martin Lang Date: Fri, 6 Oct 2023 11:58:29 +0200 Subject: [PATCH] chore: switch from deprecated pkg_resources to importlib.metadata --- oommfc/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/oommfc/__init__.py b/oommfc/__init__.py index d47833e9..1f066acb 100644 --- a/oommfc/__init__.py +++ b/oommfc/__init__.py @@ -1,5 +1,6 @@ """OOMMF calculator.""" -import pkg_resources +import importlib.metadata + import pytest import oommfc.oommf @@ -19,7 +20,7 @@ Xf_ThermSpinXferEvolver, ) -__version__ = pkg_resources.get_distribution(__name__).version +__version__ = importlib.metadata.version(__package__) runner = oommfc.oommf.oommf.Runner() """Controls the default runner.