You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/concepts/projects/dependencies.md
+33-34Lines changed: 33 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -408,53 +408,52 @@ Or, a path to a project directory:
408
408
$ uv add ~/projects/bar/
409
409
```
410
410
411
-
!!! important
411
+
### Path dependency installation
412
412
413
-
An [editable installation](#editable-dependencies) is not used for path dependencies by
414
-
default. An editable installation may be requested for project directories:
413
+
An [editable installation](#editable-dependencies) is not used for path dependencies by default. An
414
+
editable installation may be requested for project directories:
415
415
416
-
```console
417
-
$ uv add --editable ../projects/bar/
418
-
```
416
+
```console
417
+
$ uv add --editable ../projects/bar/
418
+
```
419
419
420
-
Which will result in a `pyproject.toml` with:
420
+
Which will result in a `pyproject.toml` with:
421
421
422
-
```toml title="pyproject.toml"
423
-
[project]
424
-
dependencies = ["bar"]
422
+
```toml title="pyproject.toml"
423
+
[project]
424
+
dependencies = ["bar"]
425
425
426
-
[tool.uv.sources]
427
-
bar = { path = "../projects/bar", editable = true }
428
-
```
426
+
[tool.uv.sources]
427
+
bar = { path = "../projects/bar", editable = true }
428
+
```
429
429
430
-
Similarly, if a project is marked as a [non-package](./config.md#build-systems), but you'd
431
-
like to install it in the environment as a package, set `package = true` on the source:
430
+
Similarly, if a project is marked as a [non-package](./config.md#build-systems), but you'd like to
431
+
install it in the environment as a package, set `package = true` on the source:
432
432
433
-
```toml title="pyproject.toml"
434
-
[project]
435
-
dependencies = ["bar"]
433
+
```toml title="pyproject.toml"
434
+
[project]
435
+
dependencies = ["bar"]
436
436
437
-
[tool.uv.sources]
438
-
bar = { path = "../projects/bar", package = true }
439
-
```
437
+
[tool.uv.sources]
438
+
bar = { path = "../projects/bar", package = true }
439
+
```
440
440
441
-
If the project is not marked as a non-package and no value is set for `package` on the source, the default behavior is to install it as a package, even if it lacks a [build
442
-
specification](./config.md#build-systems). If you'd like to avoid installing it, set
443
-
`package = false` on the source:
441
+
If the dependency project is not marked as a non-package and no value is set for `package` on the
442
+
source, the default behavior is to install it as a package, even if it lacks a
443
+
[[build-system] table](./config.md#build-systems). If you'd like to avoid installing it, set
444
+
`package = false` on the source:
444
445
445
-
```toml title="pyproject.toml"
446
-
[project]
447
-
dependencies = ["bar"]
446
+
```toml title="pyproject.toml"
447
+
[project]
448
+
dependencies = ["bar"]
448
449
449
-
[tool.uv.sources]
450
-
bar = { path = "../projects/bar", package = false }
451
-
```
450
+
[tool.uv.sources]
451
+
bar = { path = "../projects/bar", package = false }
452
+
```
452
453
453
-
This will override the default behavior and the path dependency's own `tool.uv.package`
454
-
value.
454
+
This will override the default behavior and the path dependency's own `tool.uv.package` value.
455
455
456
-
For multiple packages in the same repository, [_workspaces_](./workspaces.md) may be a better
457
-
fit.
456
+
For multiple packages in the same repository, [_workspaces_](./workspaces.md) may be a better fit.
0 commit comments