Skip to content

Commit d53e9a1

Browse files
committed
Switch to new way of getting version for Sphinx build.
1 parent dc707a9 commit d53e9a1

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

docs/source/conf.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
# pylint: disable=invalid-name
77

88
import datetime
9-
10-
from pkg_resources import get_distribution
9+
import importlib.metadata
1110

1211
project = "VWS-Python"
1312
author = "Adam Dangoor"
@@ -33,9 +32,9 @@
3332
# |version| and |release|, also used in various other places throughout the
3433
# built documents.
3534
#
36-
# Use ``pkg_resources`` as per
35+
# Use ``importlib.metadata.version`` as per
3736
# https://github.com/pypa/setuptools_scm#usage-from-sphinx.
38-
version = get_distribution(project).version
37+
version = importlib.metadata.version(distribution_name=project)
3938
_month, _day, _year, *_ = version.split(".")
4039
release = f"{_month}.{_day}.{_year}"
4140

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ dev = [
256256
"sphinxcontrib-spelling==8.0.0",
257257
"types-freezegun==1.1.10",
258258
"types-requests==2.28.11.15",
259-
"types-setuptools==67.6.0.0",
260259
"vulture==2.7",
261260
]
262261

0 commit comments

Comments
 (0)