Skip to content

Editable local pixi-build-python package is built twice #267

Closed

Description

@crusaderky

prefix-dev/setup-pixi v0.9.6
pixi v0.69.0

In https://github.com/dask/dask/ we have:

.github/workflows/tests.yml

[...]

      - uses: prefix-dev/setup-pixi@v0
        with:
          pixi-version: v0.69.0
          environments: ${{ matrix.environment }}
          cache: true
          locked: true

      - run: pixi run -e ${{ matrix.environment }}${{ matrix.task }}

pixi.toml

[workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["linux-64", "linux-aarch64", "osx-arm64", "win-64"]
preview = ["pixi-build"]

[package]
name = "dask-core"
# FIXME work around poor pixi-build support for SCM versioning
version = "2099.0.0"

[package.build]
backend = { name = "pixi-build-python", version = "*" }
source = { path = "." }

[package.host-dependencies]
setuptools = "*"
setuptools-scm = "*"

[package.run-dependencies]
click = ">=8.1"
cloudpickle = ">=3.0.0"
fsspec = ">=2021.9.0"
packaging = ">=20.0"
partd = ">=1.4.0"
pyyaml = ">=5.4.1"
toolz = ">=0.12.0"

[dependencies]
dask-core = { path = "." }

Expected behaviour

prefix-dev/setup-pixi installs the editable dask-core package.
pixi run doesn't do any additional installation.

Actual behaviour

prefix-dev/setup-pixi installs the editable dask-core package.
pixi run installs it again.

Example log

https://github.com/dask/dask/actions/runs/26744673880/job/78817014680?pr=12433


pixi install -e spark --locked
  /home/runner/.pixi/bin/pixi install -e spark --locked --manifest-path /home/runner/work/dask/dask/pixi.toml --color always
  
   ╭─ Running build for recipe: dask-core-2099.0.0-pyh4616a5c_0
   [...]
   │ │ Files in package:
   │ │   ├─ site-packages/__editable__.dask-2026.3.0.post64+gffc32cb67.pth (121 B)
   │ │   ├─ site-packages/__editable___dask_2026_3_0_post64_gffc32cb67_finder.py (3.32 KiB)
   [...]
   
   
   Run pixi run -e spark test-spark
✨ Pixi task (test-spark in spark): pytest --cov --cov-report=xml --junit-xml=pytest.xml --runslow dask/tests/test_spark_compat.py

 ╭─ Running build for recipe: dask-core-2099.0.0-pyh4616a5c_0
 [...]
 │ │ Files in package:
 │ │   ├─ site-packages/__editable__.dask-2026.3.0.post64+gffc32cb67.d20260601.pth (141 B)
 │ │   ├─ site-packages/__editable___dask_2026_3_0_post64_gffc32cb67_d20260601_finder.py (3.33 KiB)
 [...]

Notes

I repeated the exact commands from the log above on my local Linux box and failed to replicate the behaviour:

$ pixi --version
pixi 0.69.0
$ pixi clean
  Removed /home/crusaderky/github/dask/.pixi/envs (1.5 GiB)                                                                                                                                       
  Removed /home/crusaderky/github/dask/.pixi/artifacts-v0 (13.9 KiB)                                                                                                                              
  Removed /home/crusaderky/github/dask/.pixi/bld (252.4 MiB)                                                                                                                                      
  Removed /home/crusaderky/github/dask/.pixi/meta-v0 (125.1 KiB)                                                                                                                                  Removed 1.8 GiB
$ pixi install -e spark --locked
# builds editable package
$ pixi run -e spark test-spark
# executes pytest right away

Activity

  1. pavelzw commented on Jun 1, 2026

    @pavelzw
    Collaborator

    i think @baszalmstra observed this as well in https://github.com/conda/rattler.
    i do believe this is a pixi issue and not a setup-pixi issue. can we reproduce this locally in some way?

  2. added theissue type on Jun 1, 2026
  3. crusaderky commented on Jun 1, 2026

    @crusaderky
    Author

    I've reproduced this also with

          - uses: prefix-dev/[email protected]
            with:
              pixi-version: v0.69.0
              run-install: false
              cache: false
              locked: false
    
          - run: pixi update -e ${{ matrix.environment }}
          - run: pixi install -e ${{ matrix.environment }}  # Builds editable install
          - run: pixi run -e ${{ matrix.environment }} test  # Builds it again

    same commands ran locally don't present the issue.

    Locally, I've also tried running pixi run in a separate terminal, to make sure there was no env variable contamination, but I still can't reproduce the behaviour.

  4. added
    bug
    on Jun 5, 2026
  5. baszalmstra commented on Jun 5, 2026

    @baszalmstra

    I think the reason why the package is rebuild the second time is because you changed the source code:

    > sed -i.bak 's/timeout_method = "thread"/timeout_method = "signal"/' pyproject.toml
    

    I'm confident this then causes a rebuild.

    I've reproduced this also with

    That doesn't explain this behavior though.

    Im adding more logging to pixi to report why a rebuild is happening.

  6. crusaderky commented on Jun 5, 2026

    @crusaderky
    Author

    Yes, moving the pyproject.toml change upstream of setup-pixi works. Thank you!

    That doesn't explain this behavior though.

    My bad, I simplified too much. That also gets fixed by moving the change upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpixi-build-python

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions