Skip to content

Commit

Permalink
readthedocs: use poetry to install dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dlech committed Oct 5, 2024
1 parent f6a537e commit f034c0e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
21 changes: 14 additions & 7 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,21 @@ version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.9"
python: "3.12"
jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- pip install poetry
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
# VIRTUAL_ENV needs to be set manually for now.
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --only docs


# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand All @@ -18,8 +30,3 @@ sphinx:
# If using Sphinx, optionally build your docs in additional formats such as PDF
formats:
- pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dbus-fast = { version = ">=1.83.0, < 3", markers = "platform_system == 'Linux'"
[tool.poetry.group.docs.dependencies]
Sphinx = "^5.1.1"
sphinx-rtd-theme = "^1.0.0"
tomli = "^2.0.1"

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

0 comments on commit f034c0e

Please sign in to comment.