Skip to content

Commit 34215b9

Browse files
lemoerBastian-Krause
authored andcommitted
doc/conf: use importlib.metadata in favor of pkg_resources
Since Python 3.12, setuptools is no longer pre-installed in virtual envs created with venv [1]. The used alternative `importlib.metadata` is available for Python >=3.8 [2]. [1] https://docs.python.org/3/library/venv.html#module-venv [2] https://docs.python.org/3.12/library/importlib.metadata.html Signed-off-by: Leonardo Mörlein <[email protected]> [bst: rephrased commit message]
1 parent 4f5c5f5 commit 34215b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import sys
2222
sys.path.insert(0, os.path.abspath('..'))
2323

24-
from pkg_resources import get_distribution
24+
from importlib.metadata import version
2525

2626
# Import read_the_docs theme
2727
import sphinx_rtd_theme
@@ -65,7 +65,7 @@
6565
# built documents.
6666
#
6767
# The full version, including alpha/beta/rc tags.
68-
release = get_distribution('labgrid').version
68+
release = version('labgrid')
6969
# The short X.Y version.
7070
version = '.'.join(release.split('.')[:2])
7171

0 commit comments

Comments
 (0)