From f034c0e35960c5ade979842bc235fa40bdaef614 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Sat, 5 Oct 2024 15:10:42 -0500 Subject: [PATCH] readthedocs: use poetry to install dependencies --- .readthedocs.yml | 21 ++++++++++++++------- poetry.lock | 2 +- pyproject.toml | 1 + 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 614cce70..2a0a8534 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -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: @@ -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 diff --git a/poetry.lock b/poetry.lock index 1502fd2c..dc89670d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1160,4 +1160,4 @@ test = ["big-O", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-it [metadata] lock-version = "2.0" python-versions = ">=3.8,<3.14" -content-hash = "d6a83c8e26778000e1189a9497dbc4adba6b439c489b4ee59be66a412d68aac2" +content-hash = "22885f16b59e72fb2bcf6fd88c81cabc7d48ebb05555f12375226200ca26c61e" diff --git a/pyproject.toml b/pyproject.toml index 0a5c9a94..e9d764d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"