mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-03-17 06:30:27 +00:00
15 lines
422 B
Python
15 lines
422 B
Python
try:
|
|
from importlib.metadata import version # New in Python 3.8
|
|
except ImportError:
|
|
from pkg_resources import ( # from setuptools, deprecated
|
|
DistributionNotFound,
|
|
get_distribution,
|
|
)
|
|
|
|
try:
|
|
__version__ = get_distribution("django-auditlog").version
|
|
except DistributionNotFound:
|
|
# package is not installed
|
|
pass
|
|
else:
|
|
__version__ = version("django-auditlog")
|