diff --git a/.github/workflows/install_doctest_lint_typecheck.yml b/.github/workflows/install_doctest_lint_typecheck.yml index f9e4daa..f05dd64 100644 --- a/.github/workflows/install_doctest_lint_typecheck.yml +++ b/.github/workflows/install_doctest_lint_typecheck.yml @@ -76,5 +76,6 @@ jobs: - name: mypy run: | pip install numpy # for the typing stubs + pip install importlib_metadata # for the typing stubs python -m pip install pandas-stubs types-setuptools mypy ncls diff --git a/ncls/__init__.py b/ncls/__init__.py index 799590d..960ae50 100644 --- a/ncls/__init__.py +++ b/ncls/__init__.py @@ -1,7 +1,7 @@ +import importlib_metadata import numpy as np -import pkg_resources -__version__ = pkg_resources.get_distribution("ncls").version +__version__ = importlib_metadata.version("ncls") from ncls.src.ncls import NCLS64 # type: ignore from ncls.src.ncls32 import NCLS32 # type: ignore diff --git a/pyproject.toml b/pyproject.toml index 861442a..504286c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ classifiers = [ "Topic :: Scientific/Engineering" ] keywords = ["ncls", "interval-tree", "genomics"] -dependencies = ["numpy"] +dependencies = ["numpy", "importlib_metadata"] [project.optional-dependencies] dev = ["black", "bumpver", "isort", "pip-tools", "pytest"]