uv icon indicating copy to clipboard operation
uv copied to clipboard

`uv sync` and `uv pip install -e .` do different things when virtual packages are in the workspace

Open charliermarsh opened this issue 1 year ago • 4 comments

uv sync omits them, while uv pip install -e . installs them as non-editable. This seems bad. At the very least, I'd say that uv pip install -e . should install them as editable.

charliermarsh avatar Sep 06 '24 22:09 charliermarsh

\cc @zanieb for input on the correct behavior

charliermarsh avatar Sep 06 '24 23:09 charliermarsh

Can you share a bit more details on what a reproduction looks like?

zanieb avatar Sep 07 '24 15:09 zanieb

If you uv init foo then cd foo and uv init bar, and add bar as a dependency:

[project]
name = "foo"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = ["bar"]

[tool.uv.workspace]
members = ["bar"]

[tool.uv.sources]
bar = { workspace = true }

charliermarsh avatar Sep 07 '24 15:09 charliermarsh

Then uv sync:

❯ uv sync
Using Python 3.12.1
Creating virtualenv at: .venv
Resolved 2 packages in 0.81ms
Audited in 0.00ms

Versus uv pip install -e .:

❯ uv pip install -e .
Resolved 2 packages in 2ms
Installed 2 packages in 1ms
 + bar==0.1.0 (from file:///Users/crmarsh/workspace/puffin/foo/bar)
 + foo==0.1.0 (from file:///Users/crmarsh/workspace/puffin/foo)

charliermarsh avatar Sep 07 '24 15:09 charliermarsh

same problem here

Ruhrozz avatar Nov 15 '24 10:11 Ruhrozz