Skip to content

Commit c160859

Browse files
henryiiihumitos
andauthored
docs: update uv instructions (#11322)
* docs: update uv instructions * Update docs/user/build-customization.rst * Apply suggestions from code review --------- Co-authored-by: Manuel Kaufmann <[email protected]>
1 parent c81d0f2 commit c160859

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

docs/user/build-customization.rst

+11-15
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,8 @@ Take a look at the following example:
359359
Install dependencies with ``uv``
360360
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
361361

362-
Projects managed with `uv <https://github.com/astral-sh/uv/>`__,
363-
can use the ``post_create_environment`` user-defined job to use ``uv`` for installing Python dependencies.
362+
Projects can use `uv <https://github.com/astral-sh/uv/>`__,
363+
to install Python dependencies, usually reducing the time taken to install compared to pip.
364364
Take a look at the following example:
365365

366366

@@ -373,19 +373,15 @@ Take a look at the following example:
373373
os: "ubuntu-22.04"
374374
tools:
375375
python: "3.10"
376-
jobs:
377-
post_create_environment:
378-
# Install uv
379-
- pip install uv
380-
post_install:
381-
# Install dependencies with 'docs' dependency group
382-
# VIRTUAL_ENV needs to be set manually for now.
383-
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
384-
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install .[docs]
385-
386-
sphinx:
387-
configuration: docs/conf.py
388-
376+
commands:
377+
- asdf plugin add uv
378+
- asdf install uv latest
379+
- asdf global uv latest
380+
- uv venv
381+
- uv pip install .[docs]
382+
- .venv/bin/python -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html
383+
384+
You can use ``-r docs/requirements.txt``, etc. instead as needed. MkDocs projects could use ``NO_COLOR=1 .venv/bin/mkdocs build --strict --site-dir $READTHEDOCS_OUTPUT/html`` instead.
389385

390386
Update Conda version
391387
^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)