Skip to content

Commit

Permalink
ci: Use uv for install on ReadTheDocs (#2475)
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
  , from readthedocs/readthedocs.org#11152,
  but continue to monitor alternative faster methods such as those
  described in readthedocs/readthedocs.org#11289 .
  • Loading branch information
matthewfeickert authored May 10, 2024
1 parent 58c72b6 commit ac42e21
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 ac42e21

Please sign in to comment.