diff --git a/anglerfish/anglerfish.py b/anglerfish/anglerfish.py index 9dfe5ea..3d6b582 100755 --- a/anglerfish/anglerfish.py +++ b/anglerfish/anglerfish.py @@ -7,11 +7,11 @@ import sys import uuid from collections import Counter +from importlib.metadata import version as get_version from itertools import groupby import Levenshtein as lev import numpy as np -from setuptools import pkg_resources from .demux.demux import ( Alignment, @@ -46,7 +46,7 @@ def run_demux(args): # Boilerplate multiprocessing.set_start_method("spawn") - version = pkg_resources.get_distribution("bio-anglerfish").version + version = get_version("bio-anglerfish") run_uuid = str(uuid.uuid4()) # Parse arguments diff --git a/anglerfish/cli.py b/anglerfish/cli.py index a7bb20a..2f45438 100644 --- a/anglerfish/cli.py +++ b/anglerfish/cli.py @@ -2,10 +2,10 @@ import datetime as dt import os from enum import Enum +from importlib.metadata import version as get_version from typing import Optional import typer -from setuptools import pkg_resources from typing_extensions import Annotated from .anglerfish import run_demux @@ -23,7 +23,7 @@ class IndexOrientations(str, Enum): def version_callback(value: bool): if value: - print(f'anglerfish {pkg_resources.get_distribution("bio-anglerfish").version}') + print(f'anglerfish {get_version("bio-anglerfish")}') raise typer.Exit()