-
Notifications
You must be signed in to change notification settings - Fork 259
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1398 from nipy/doc/readthedocs-drafts
doc: Build on ReadTheDocs for PR previews
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-lts-latest | ||
tools: | ||
python: latest | ||
jobs: | ||
pre_create_environment: | ||
- asdf plugin add uv | ||
- asdf install uv latest | ||
- asdf global uv latest | ||
# Turn `python -m virtualenv` into `python -c pass` | ||
- truncate --size 0 $( dirname $( uv python find ) )/../lib/python3*/site-packages/virtualenv/__main__.py | ||
post_create_environment: | ||
- uv venv $READTHEDOCS_VIRTUALENV_PATH | ||
# Turn `python -m pip` into `python -c pass` | ||
- truncate --size 0 $( ls -d $READTHEDOCS_VIRTUALENV_PATH/lib/python3* )/site-packages/pip.py | ||
post_install: | ||
# Use a cache dir in the same mount to halve the install time | ||
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install --cache-dir $READTHEDOCS_VIRTUALENV_PATH/../../uv_cache .[doc] |