From b560a4e3207a1d1352ecbc77bf6caa286678c21b Mon Sep 17 00:00:00 2001 From: Haibao Tang Date: Fri, 8 Nov 2024 20:58:32 -0800 Subject: [PATCH] update __init__.py --- jcvi/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jcvi/__init__.py b/jcvi/__init__.py index 75633151..89bf10ae 100644 --- a/jcvi/__init__.py +++ b/jcvi/__init__.py @@ -1,5 +1,5 @@ from datetime import datetime -from pkg_resources import get_distribution, DistributionNotFound +from importlib.metadata import version, PackageNotFoundError __author__ = ( @@ -15,8 +15,8 @@ try: - VERSION = get_distribution(__name__).version -except DistributionNotFound: # pragma: no cover + VERSION = version(__name__) +except PackageNotFoundError: # pragma: no cover try: from .version import version as VERSION # noqa except ImportError as exc: # pragma: no cover