Skip to content

Commit

Permalink
Replace pkg_resources with importlib.metadata for version retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
Athanaseus authored Jan 31, 2025
1 parent 54f14c2 commit 8571bdb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions breizorro/breizorro.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ def main(restored_image, mask_image, threshold, boxsize, savenoise, merge, subtr
ncpu, beam_size, gui, outfile, outcatalog, outregion):
LOGGER.info("Welcome to breizorro")
# Get version
from pkg_resources import get_distribution
_version = get_distribution('breizorro').version
try:
_version = version("breizorro")
except PackageNotFoundError:
_version = "dev"
LOGGER.info(f"Version: {_version}")
LOGGER.info("Usage: breizorro --help")

Expand Down

0 comments on commit 8571bdb

Please sign in to comment.