Skip to content

Commit ac42e21

Browse files
ci: Use uv for install on ReadTheDocs (#2475)
* 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 .
1 parent 58c72b6 commit ac42e21

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.readthedocs.yaml

+7-8
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,17 @@ build:
1313
apt_packages:
1414
- curl
1515
- jq
16+
jobs:
17+
post_create_environment:
18+
- pip install uv
19+
post_install:
20+
# VIRTUAL_ENV needs to be set manually for now.
21+
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
22+
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install '.[docs]'
1623

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

2128
# If using Sphinx, optionally build your docs in additional formats such as PDF and ePub
2229
formats: all
23-
24-
# python -m pip install '.[docs]'
25-
python:
26-
install:
27-
- method: pip
28-
path: .
29-
extra_requirements:
30-
- docs

0 commit comments

Comments
 (0)