We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 759ed09 commit accc532Copy full SHA for accc532
setup.cfg
@@ -34,3 +34,4 @@ include_package_data = True
34
python_requires = >=3.6,<4.0
35
install_requires =
36
Django>=2.2
37
+ importlib_metadata
simple_menu/__init__.py
@@ -1,9 +1,10 @@
1
-from pkg_resources import get_distribution, DistributionNotFound
+from importlib_metadata import PackageNotFoundError, version
2
+
3
from .menu import Menu, MenuItem
4
5
try:
- __version__ = get_distribution("django-simple-menu").version
6
-except DistributionNotFound:
+ __version__ = version("django-simple-menu")
7
+except PackageNotFoundError:
8
# package is not installed
9
__version__ = None
10
0 commit comments