Repository navigation
Description
Checks
- I have checked that this issue has not already been reported.
- I have confirmed this bug exists on the latest version of Pixi, using
pixi --version.
Pixi Version
pixi 0.68.1Motivation
In #3985 (comment), @tdejager mentioned that automatic rebuild/reinstall behavior is a feature Pixi is aiming for with the pixi build use case first. This issue tracks a narrower pixi-build-python/Cython case in that area, not general PyPI path dependencies.
Reproducer
tmpdir=$(mktemp -d)
cd "$tmpdir"
cat > pixi.toml <<'EOF'
[workspace]
channels = ["conda-forge"]
platforms = ["linux-64"]
preview = ["pixi-build"]
[dependencies]
source-rebuild-repro = { path = "." }
[tasks.show-doc]
cmd = ["python", "-c", "import repro; print(repro.answer.__doc__)"]
[package]
name = "source-rebuild-repro"
version = "0.1.0"
[package.build]
backend = { name = "pixi-build-python", version = "*" }
[package.build.config]
compilers = ["c"]
[package.host-dependencies]
python = "*"
setuptools = "*"
cython = "*"
[package.run-dependencies]
python = "*"
EOF
cat > pyproject.toml <<'EOF'
[build-system]
requires = ["setuptools", "cython"]
build-backend = "setuptools.build_meta"
[project]
name = "source-rebuild-repro"
version = "0.1.0"
EOF
cat > setup.py <<'EOF'
from setuptools import setup
from Cython.Build import cythonize
setup(ext_modules=cythonize("repro.pyx"))
EOF
cat > repro.pyx <<'EOF'
def answer():
"""v1"""
return 1
EOF
pixi run show-doc
# prints: v1
python - <<'PY'
from pathlib import Path
p = Path("repro.pyx")
p.write_text(p.read_text().replace("v1", "v2"))
PY
pixi run show-doc
# actual: v1
# expected: v2
pixi reinstall source-rebuild-repro
pixi run show-doc
# prints: v2Expected Behavior
For editable local source packages built by pixi-build-python, changes to compiled Cython inputs such as .pyx, .pxd, or .pxi should invalidate the source artifact cache and trigger rebuild/reinstall before pixi run executes the task.
Unchanged inputs should continue to use the cached/installed artifact.
Actual Behavior
After changing repro.pyx, pixi run show-doc runs against the stale compiled extension and still prints v1. A manual pixi reinstall source-rebuild-repro is required before pixi run show-doc prints v2.
Notes
From local investigation, the core source artifact cache already invalidates on recorded input-file mtimes and newly matching globs. The issue appears to be that editable pixi-build-python builds do not currently record Cython inputs, so the cache sidecar misses the changed repro.pyx.
Activity
[-]Local Pixi source package is not rebuilt/reinstalled by pixi run after source changes[/-][+]Editable pixi-build-python Cython source package is not rebuilt after Cython input changes[/+]wolfv commentedon May 14, 2026
Thank you @kkraus14 - we might have to change the globs to include the file types you mentioned here
pixi/crates/pixi_build_python/src/main.rs
Line 413 in e640477
Alternatively, you might be able to work around this by adding
extra_input_globs = [...]for the time being?kkraus14 commentedon May 14, 2026
I have a PR incoming with what I (and my Codex instance) believe is a fix for handling the Cython file types