Skip to content
Open
Show file tree
Hide file tree
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
54 changes: 54 additions & 0 deletions .github/workflows/pixi_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Pixi

on:
pull_request:
paths:
- "pixi.lock"
- "pyproject.toml"
- "src/**"
- "lib/**"
- ".github/workflows/pixi.yml"
push:
branches: [main]
paths:
- "pixi.lock"
- "pyproject.toml"
- "src/**"
- "lib/**"
- ".github/workflows/pixi.yml"
workflow_dispatch:

permissions: {}

jobs:
pixi-linux-install:
runs-on: ubuntu-24.04
permissions:
contents: read

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false

- name: Set up pixi and install environment
uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.66.0
locked: true
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
- name: Show pixi info
run: |
pixi info
pixi list
- name: Clean build artifacts
run: |
rm -rf build meson-logs meson-private .mesonpy-*
- name: Install Matplotlib editable
run: pixi run python -m pip install --config-settings=setup-args="-Db_lto=false" --editable .
- name: Smoke test editable install
run: |
pixi run python -c "import matplotlib; print(matplotlib.__version__)"
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ ENV/
env.bak/
venv.bak/

# pixi files on top level
pixi.toml
.pixi/
# ignore the lock file, but we want to commit this if lock is purposely made from
# pyproject.toml. If you want the lock file committed, just do `git add -f pixi.lock`
# after generating it.
pixi.lock


# Jupyter files #
#################

Expand Down
37 changes: 37 additions & 0 deletions doc/devel/development_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,43 @@ setup.

Remember to activate the environment whenever you start working on Matplotlib!

.. tab-item:: pixi environment

A pixi configuration is included in ``pyproject.toml``. The environment
includes the base Matplotlib dependencies, and documentation and testing
dependencies. To install the dependencies::

pixi install

and then to install an editable version on Matplotlib::

pixi run python -m pip install \
--no-build-isolation \
--config-settings=setup-args="-Db_lto=false" \
--editable .

(the ``-Db_lto=false`` is not needed on all platforms). You can test the installation with::

pixi run python -c "import matplotlib; print(matplotlib.__file__)"

Note there are some pixi tasks available as shortcuts::

pixi task list

If you do not want to use ``pixi run`` in front of every command, you can do::

pixi shell

and continue to use pixi as a python environment.

.. note:: do not edit the ``pyproject.toml`` file and commit to the repository, as this
will affect all developers. If you want to change the dependencies, please open an
issue or pull request to discuss the change. If you want a custom ``pixi.toml`` file,
you can create one in your home directory, and it will be used instead of the
repository one. An example is available in ``tools/pixi.example.toml`` that lists the
dependencies needed to build Matplotlib.

.. _pixi: https://pixi.prefix.dev/

Install external dependencies
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
Loading
Loading