diff --git a/discretisedfield/__init__.py b/discretisedfield/__init__.py index 92f3793c..38ebf6e4 100644 --- a/discretisedfield/__init__.py +++ b/discretisedfield/__init__.py @@ -1,9 +1,9 @@ """Finite-difference fields.""" +import importlib.metadata import os import pathlib import matplotlib.pyplot as plt -import pkg_resources import pytest from . import tools @@ -18,7 +18,7 @@ # Enable default plotting style. plt.style.use(pathlib.Path(__file__).parent / "plotting" / "plotting-style.mplstyle") -__version__ = pkg_resources.get_distribution(__name__).version +__version__ = importlib.metadata.version(__package__) def test():