mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-03-16 22:20:26 +00:00
docs(conf): replace pkg_resources with importlib
The doc is build with python 3.8, which includes the `importlib` API to get the package version. Its use is recommended by `setuptools-scm` for the doc.
This commit is contained in:
parent
f516aae4a6
commit
a30c8bbfc0
1 changed files with 2 additions and 2 deletions
|
|
@ -9,7 +9,7 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from datetime import date
|
from datetime import date
|
||||||
from pkg_resources import get_distribution
|
from importlib.metadata import version
|
||||||
|
|
||||||
# -- Path setup --------------------------------------------------------------
|
# -- Path setup --------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -31,7 +31,7 @@ project = 'django-auditlog'
|
||||||
author = 'Jan-Jelle Kester and contributors'
|
author = 'Jan-Jelle Kester and contributors'
|
||||||
copyright = f'2013-{date.today().year}, {author}'
|
copyright = f'2013-{date.today().year}, {author}'
|
||||||
|
|
||||||
release = get_distribution('django-auditlog').version
|
release = version('django-auditlog')
|
||||||
# for example take major/minor
|
# for example take major/minor
|
||||||
version = '.'.join(release.split('.')[:2])
|
version = '.'.join(release.split('.')[:2])
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue