Skip to content

Commit b0c1f81

Browse files
committed
DEP: drop undeclared runtime dependency on setuptools
1 parent b33c541 commit b0c1f81

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

mpl_scatter_density/__init__.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
from .scatter_density_artist import * # noqa
22
from .scatter_density_axes import * # noqa
33

4-
from pkg_resources import get_distribution, DistributionNotFound
4+
import sys
5+
if sys.version_info >= (3, 8):
6+
from importlib.metadata import version
7+
else:
8+
from importlib_metadata import version
59

6-
try:
7-
__version__ = get_distribution('mpl-scatter-density').version
8-
except DistributionNotFound:
9-
__version__ = 'undefined'
10+
__version__ = version("mpl-scatter-density")
11+
del version, sys

setup.cfg

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ install_requires =
1717
numpy
1818
matplotlib>=3.0
1919
fast-histogram>=0.3
20+
importlib_metadata>=1.4 ; python_version < '3.8'
2021

2122
[options.extras_require]
2223
test =

0 commit comments

Comments
 (0)