From e48303c3cee2eb8860337b53d3b59bd65a1dfeae Mon Sep 17 00:00:00 2001 From: Haibao Tang Date: Fri, 8 Nov 2024 21:06:02 -0800 Subject: [PATCH] update __init__.py (#717) --- 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