Skip to content
Merged
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
11 changes: 6 additions & 5 deletions docs/concepts/projects/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -859,9 +859,9 @@ uv allows dependencies to be "virtual", in which the dependency itself is not in
By default, dependencies are never virtual.

A dependency with a [`path` source](#path) can be virtual if it explicitly sets
[`tool.uv.package = false`](../../reference/settings.md#package). Unlike working _in_ the dependent
project with uv, the package will be built even if a [build system](./config.md#build-systems) is
not declared.
[`tool.uv.package = false`](../../reference/settings.md#package). Without this setting, uv treats
the path dependency as a normal package and will attempt to build it, even if the project does not
declare a [build system](./config.md#build-systems).

To treat a dependency as virtual, set `package = false` on the source:

Expand All @@ -885,8 +885,9 @@ bar = { path = "../projects/bar", package = true }
```

Similarly, a dependency with a [`workspace` source](#workspace-member) can be virtual if it
explicitly sets [`tool.uv.package = false`](../../reference/settings.md#package). The workspace
member will be built even if a [build system](./config.md#build-systems) is not declared.
explicitly sets [`tool.uv.package = false`](../../reference/settings.md#package). Without this
setting, the workspace member will be built even if a [build system](./config.md#build-systems) is
not declared.

Workspace members that are _not_ dependencies can be virtual by default, e.g., if the parent
`pyproject.toml` is:
Expand Down
Loading