diff --git a/.readthedocs.yml b/.readthedocs.yml index 10264349..365eee2c 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,12 +8,13 @@ build: os: "ubuntu-22.04" tools: python: "3.11" - jobs: - pre_build: - - bash ./scripts/rtd-pre-sphinx-build.sh - -python: - install: - - method: pip - path: . - - requirements: "requirements/py3.11/docs.txt" + # use 'uv pip install' to apply build customization in a pip-compatible way + # see: https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-uv + commands: + - asdf plugin add uv + - asdf install uv latest + - asdf global uv latest + - uv venv + - uv pip install . -r "requirements/py3.11/docs.txt" + - bash ./scripts/rtd-pre-sphinx-build.sh + - uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html diff --git a/scripts/rtd-pre-sphinx-build.sh b/scripts/rtd-pre-sphinx-build.sh index ae4c9851..1b1fcbab 100755 --- a/scripts/rtd-pre-sphinx-build.sh +++ b/scripts/rtd-pre-sphinx-build.sh @@ -39,4 +39,4 @@ if [ -z "$(find changelog.d -name '*.rst')" ]; then exit 0 fi -scriv collect --keep --version "$VERSION" -v DEBUG +uv run scriv collect --keep --version "$VERSION" -v DEBUG