mirror of
https://github.com/jazzband/django-auditlog.git
synced 2026-04-30 19:54:44 +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
57ddb9693a
commit
645bb83c59
1 changed files with 2 additions and 3 deletions
|
|
@ -9,8 +9,7 @@
|
|||
import os
|
||||
import sys
|
||||
from datetime import date
|
||||
|
||||
from pkg_resources import get_distribution
|
||||
from importlib.metadata import version
|
||||
|
||||
# -- Path setup --------------------------------------------------------------
|
||||
|
||||
|
|
@ -33,7 +32,7 @@ project = "django-auditlog"
|
|||
author = "Jan-Jelle Kester and contributors"
|
||||
copyright = f"2013-{date.today().year}, {author}"
|
||||
|
||||
release = get_distribution("django-auditlog").version
|
||||
release = version("django-auditlog")
|
||||
# for example take major/minor
|
||||
version = ".".join(release.split(".")[:2])
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue