Enable projects to opt-out of workspace management (#4565)

## Summary

You can now add `managed = false` under `[tool.uv]` in a
`pyproject.toml` to explicitly opt out of the project and workspace
APIs.

If a project sets `managed = false`, we will (1) _not_ discover it as a
workspace root, and (2) _not_ discover it as a workspace member (similar
to using `exclude` in the workspace parent).

Closes https://github.com/astral-sh/uv/issues/4551.
This commit is contained in:
Charlie Marsh 2024-07-01 16:17:43 -04:00 committed by GitHub
parent be2a67cd9b
commit a4417eba4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 120 additions and 0 deletions

View file

@ -0,0 +1,12 @@
[project]
name = "seeds"
version = "1.0.0"
requires-python = ">=3.12"
dependencies = ["idna==3.6"]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.uv]
managed = false

View file

@ -0,0 +1,5 @@
import idna
def seeds():
print("sunflower")