Skip to content

Add an example of pip install --group #12189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions docs/user/build-customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,32 @@ Take a look at the following example:

MkDocs projects could use ``NO_COLOR=1 uv run mkdocs build --strict --site-dir $READTHEDOCS_OUTPUT/html`` instead.

Install dependencies from Dependency Groups
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Python `Dependency Groups <https://packaging.python.org/en/latest/specifications/dependency-groups/>`_
are a way of storing lists of dependencies in your ``pyproject.toml``.

``pip`` version 25.1 and later, which is the default for Read the Docs builds,
as well as many other tools support Dependency Groups.
This example uses ``pip`` and installs from a group named ``docs``:

.. code-block:: yaml
:caption: .readthedocs.yaml

version: 2

build:
os: ubuntu-24.04
tools:
python: "3.13"
jobs:
install:
- pip install --group 'docs'

For more information on relevant ``pip`` usage, see the
`pip user guide on Dependency Groups <https://pip.pypa.io/en/stable/user_guide/#dependency-groups>`_.

Update Conda version
~~~~~~~~~~~~~~~~~~~~

Expand Down