Skip to content

Commit

Permalink
replace deprecated package
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffjennings committed Oct 9, 2024
1 parent 123fb48 commit 47863ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions astropylibrarian/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

__all__ = ("__version__",)

from pkg_resources import DistributionNotFound, get_distribution
from importlib.metadata import version, PackageNotFoundError

try:
__version__ = get_distribution(__name__).version
except DistributionNotFound:
__version__ = version(__name__)
except PackageNotFoundError:
# package is not installed
__version__ = "0.0.0"

0 comments on commit 47863ca

Please sign in to comment.