mirror of
https://github.com/jazzband/django-configurations.git
synced 2026-03-16 22:20:27 +00:00
Use importlib.metadata instead of pkg_resources to get version
This commit is contained in:
parent
62d34c2a16
commit
4bd4cf5dd4
2 changed files with 3 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from pkg_resources import get_distribution, DistributionNotFound
|
||||
from importlib.metadata import PackageNotFoundError, version
|
||||
|
||||
try:
|
||||
__version__ = get_distribution("django-configurations").version
|
||||
except DistributionNotFound:
|
||||
__version__ = version("django-configurations")
|
||||
except PackageNotFoundError:
|
||||
# package is not installed
|
||||
__version__ = None
|
||||
|
|
|
|||
1
setup.py
1
setup.py
|
|
@ -28,7 +28,6 @@ setup(
|
|||
},
|
||||
install_requires=[
|
||||
'django>=2.2',
|
||||
'setuptools',
|
||||
],
|
||||
extras_require={
|
||||
'cache': ['django-cache-url'],
|
||||
|
|
|
|||
Loading…
Reference in a new issue