Skip to content

Commit

Permalink
ci: Use uv for install on ReadTheDocs
Browse files Browse the repository at this point in the history
* RTD doesn't support uv at the same level as pip, but there are ways
  to still use it along with most of the infrastructure. Adopt the
  strategy provided in ReadTheDocs's 'Build process customization' section
  https://docs.readthedocs.io/en/latest/build-customization.html#install-dependencies-with-uv
  but continue to monitor alternative faster methods such as those
  described in https://github.com/readthedocs/readthedocs.org/issues/ 11289 .
  • Loading branch information
matthewfeickert committed May 10, 2024
1 parent 58c72b6 commit 07eef5c
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@ build:
apt_packages:
- curl
- jq
jobs:
post_create_environment:
- pip install uv
post_install:
# VIRTUAL_ENV needs to be set manually for now.
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install '.[docs]'

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF and ePub
formats: all

# python -m pip install '.[docs]'
python:
install:
- method: pip
path: .
extra_requirements:
- docs

0 comments on commit 07eef5c

Please sign in to comment.