From 53df36d615384653d5dad27be81e7ebd017019b5 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Fri, 8 Nov 2024 11:15:07 -0500 Subject: [PATCH] Preempt virtualenv, disable global cache --- .readthedocs.yaml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 4f8116a3..b7fc8545 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -5,12 +5,15 @@ build: tools: python: latest jobs: - post_create_environment: + pre_create_environment: - asdf plugin add uv - asdf install uv latest - asdf global uv latest - # Turn `python -m pip` into `python -c pass` - - truncate --size 0 $READTHEDOCS_VIRTUALENV_PATH/lib/python3*/site-packages/pip/__main__.py - - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install --upgrade sphinx + - uv venv $READTHEDOCS_VIRTUALENV_PATH + # Turn `python -m [pip|virtualenv]` into `python -c pass` + - truncate --size 0 $READTHEDOCS_VIRTUALENV_PATH/lib/python3*/site-packages/pip.py + - truncate --size 0 $READTHEDOCS_VIRTUALENV_PATH/lib/python3*/site-packages/virtualenv.py + post_create_environment: + - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install -n --upgrade sphinx post_install: - - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install -r docs/requirements.txt + - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install -n -r docs/requirements.txt