Skip to content

Commit

Permalink
docs: update uv instructions (#11322)
Browse files Browse the repository at this point in the history
* docs: update uv instructions

* Update docs/user/build-customization.rst

* Apply suggestions from code review

---------

Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
  • Loading branch information
henryiii and humitos committed May 14, 2024
1 parent c81d0f2 commit c160859
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions docs/user/build-customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ Take a look at the following example:
Install dependencies with ``uv``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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


Expand All @@ -373,19 +373,15 @@ Take a look at the following example:
os: "ubuntu-22.04"
tools:
python: "3.10"
jobs:
post_create_environment:
# Install uv
- pip install uv
post_install:
# Install dependencies with 'docs' dependency group
# VIRTUAL_ENV needs to be set manually for now.
# See https://github.com/readthedocs/readthedocs.org/pull/11152/
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install .[docs]
sphinx:
configuration: docs/conf.py
commands:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- uv venv
- uv pip install .[docs]
- .venv/bin/python -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html
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.

Update Conda version
^^^^^^^^^^^^^^^^^^^^
Expand Down

0 comments on commit c160859

Please sign in to comment.