Skip to content

Add pixi example #12155

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 2 commits into from
Jun 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
29 changes: 29 additions & 0 deletions docs/user/build-customization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,35 @@ This example uses ``pip`` and installs from a group named ``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>`_.

Install dependencies with ``pixi``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Projects can use `pixi <https://github.com/prefix-dev/pixi/>`__,
to install Python dependencies, usually reducing the time taken to install compared to conda or pip.
Take a look at the following example:


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

version: 2

build:
os: ubuntu-24.04
jobs:
create_environment:
- asdf plugin add pixi
- asdf install pixi latest
- asdf global pixi latest
install:
# assuming you have an environment called "docs"
- pixi install -e docs
build:
html:
- pixi run -e docs sphinx-build -T -b html docs $READTHEDOCS_OUTPUT/html

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

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

Expand Down