Skip to content

Commit

Permalink
Merge pull request #213 from mdshw5/mdshw5-patch-3
Browse files Browse the repository at this point in the history
Replace usage of pkg_resources API
  • Loading branch information
mdshw5 committed Sep 22, 2023
2 parents bbe7425 + ca053e0 commit cac82f2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
8 changes: 6 additions & 2 deletions pyfaidx/__init__.py
Expand Up @@ -18,7 +18,11 @@
from os.path import getmtime
from tempfile import TemporaryFile
from threading import Lock
from pkg_resources import get_distribution

try:
from importlib.metadata import version
except ImportError: #python < 3.8
from importlib_metadata import version

from six import PY2, PY3, integer_types, string_types
from six.moves import zip_longest
Expand All @@ -33,7 +37,7 @@
except ImportError:
fsspec = None

__version__ = get_distribution("pyfaidx").version
__version__ = version("pyfaidx")

if sys.version_info > (3, ):
buffer = memoryview
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Expand Up @@ -28,7 +28,8 @@ classifiers = [
]
dependencies = [
"six",
"setuptools"
"setuptools",
"importlib_metadata"
]
dynamic = ["version"]

Expand Down

0 comments on commit cac82f2

Please sign in to comment.