Skip to content

Commit f034c0e

Browse files
committed
readthedocs: use poetry to install dependencies
1 parent f6a537e commit f034c0e

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

.readthedocs.yml

+14-7
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,21 @@ version: 2
77

88
# Set the version of Python and other tools you might need
99
build:
10-
os: ubuntu-22.04
10+
os: ubuntu-24.04
1111
tools:
12-
python: "3.9"
12+
python: "3.12"
13+
jobs:
14+
post_create_environment:
15+
# Install poetry
16+
# https://python-poetry.org/docs/#installing-manually
17+
- pip install poetry
18+
post_install:
19+
# Install dependencies with 'docs' dependency group
20+
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
21+
# VIRTUAL_ENV needs to be set manually for now.
22+
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
23+
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --only docs
24+
1325

1426
# Build documentation in the docs/ directory with Sphinx
1527
sphinx:
@@ -18,8 +30,3 @@ sphinx:
1830
# If using Sphinx, optionally build your docs in additional formats such as PDF
1931
formats:
2032
- pdf
21-
22-
# Optionally declare the Python requirements required to build your docs
23-
python:
24-
install:
25-
- requirements: docs/requirements.txt

poetry.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ dbus-fast = { version = ">=1.83.0, < 3", markers = "platform_system == 'Linux'"
4242
[tool.poetry.group.docs.dependencies]
4343
Sphinx = "^5.1.1"
4444
sphinx-rtd-theme = "^1.0.0"
45+
tomli = "^2.0.1"
4546

4647
[tool.poetry.group.lint.dependencies]
4748
black = ">=24.3,<25.0"

0 commit comments

Comments
 (0)