Repository navigation
Description
Problem description
The pixi docs recommend adding, for the current project:
# Editable installs
[tool.pixi.pypi-dependencies]
pixi-py = { path = ".", editable = true }The above interacts poorly with versioning tools that automatically increase the version by one at every commit, such as setuptools-scm or hatch-vcs.
With these tools in charge of versioning, the pixi.lock will change every time anything in the project changes, which creates noise in the git history.
Additionally, if a user performs a trivial commit that doesn't require rerunning pixi locally (e.g. fix a spelling mistake) and then pushes to remote, CI will fail as actions/setup-pixi defaults to locked: true. Forcing locked: false is a bad idea; having CI crash if the pixi.lock does not reflect what dependencies are actually being tested/built is generally very desirable.
Expected behaviour
Changes to the python files in the local git repo should never cause the pixi.lock to be invalidated.
Editable installs should not record their version or hash to pixi.lock.
Workarounds
1. Do not install
Don't pip-install the current project; import it directly from the project root instead.
This can become quite fiddly when you need to start the Python interpreter in a subdirectory for whatever reason (e.g. to run sphinx-build in the docs/ directory).
This workaround is not feasible whenever compilation is involved.
2. pip install task
Do not list the local project in pip-dependencies. Instead have:
pyproject.toml:
[tool.pixi.dependencies]
python = "*"
pip = "*"
[tool.pixi.tasks]
editable-install = "python ci/editable_install.py"
hello = {cmd = "python -c 'import pixi_py; pixi_py.hello_world()'", depends-on = ["editable-install"] }ci/editable_install.py:
import importlib.metadata
import subprocess
import sys
if __name__ == "__main__":
try:
version = importlib.metadata.version("pixi-py")
print(f"pixi-py {version} is already installed")
do_install = False
except importlib.metadata.PackageNotFoundError:
do_install = True # Shorten traceback in case of installation failure
if do_install:
args = [
sys.executable,
"-m",
"pip",
"install",
"--no-build-isolation",
"--no-dependencies",
"--editable",
]
print(*args)
subprocess.check_call(args)on my machine the editable-install task takes 260ms to run when there's nothing to do, which is tolerable.
Activity
lucascolley commentedon Jan 13, 2026
I think the core worry here is a duplicate of #2512 (but thank you for the additional thoughts)
But as per the linked issue, support is likely to be prioritised for pixi-build (which should also work for your use-case?) over pypi, hence gh-2946 may be the more relevant issue
baszalmstra commentedon Jan 15, 2026
@nichmor with your recent changes do we still record the version in the lock-file for editable packages?
tdejager commentedon Jan 16, 2026
Yeah we do, that would require a seperate change. But I think we can start on it soon enough after we make a new lock-file version.
I'm still gonna close this in favor of the #2512