Skip to content

Commit b104bda

Browse files
committed
fixup! Reconfigure ".readthedocs.yaml"
1 parent 1660ca8 commit b104bda

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version: 2
66
build:
77
os: ubuntu-24.04
88
tools:
9-
python: "3.12"
9+
python: "3.13"
1010
commands:
1111
# Install uv and sync dependencies from uv.lock
1212
- pip install uv

docs/conf.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import sys
1616
import os
17-
import pkg_resources
17+
import importlib.metadata as metadata
1818

1919
# If extensions (or modules to document with autodoc) are in another directory,
2020
# add these directories to sys.path here. If the directory is relative to the
@@ -64,10 +64,10 @@
6464
# release = u'0.6.1'
6565

6666
try:
67-
release = pkg_resources.get_distribution('mockito').version
68-
except pkg_resources.DistributionNotFound:
69-
print('mockito must be installed to build the documentation.')
70-
print('Install from source using `pip install -e .` in a virtualenv.')
67+
release = metadata.version("mockito")
68+
except metadata.PackageNotFoundError:
69+
print("mockito must be installed to build the documentation.")
70+
print("Install from source using `uv sync` or `pip install -e .` in a virtualenv.")
7171
sys.exit(1)
7272

7373
if 'dev' in release:

0 commit comments

Comments
 (0)