For sure – the source is here.
They are:
{ registry = "https://pypi.org/simple" }
{ url = "https://example.org/foo-1.0.zip" }
{ git = "https://github.com/agronholm/anyio?tag=4.6.2#c4844254e6db0cb804c240ba07405db73d810e0b" }
{ path = "../library/foo-1.0.0-py3-none-any.whl" }
(a local distribution, like a.whl
or.tar.gz
){ editable = "../library" }
(an editable source tree){ directory = "../library" }
(a non-editable source tree){ virtual = "../library" }
(this one is the strangest, it means: install the project’s dependencies, but not the project itself)
The whole editable
vs. directory
vs. virtual
thing is somewhat debatable but hopefully the intent is clear at least.
I think there are two parts to this…
First, we typically lock for all platforms, so the graph is “complete”. In that case, we traverse the graph, and if we can’t find a compatible wheel or source distribution for a given package (or, e.g., we can’t find a wheel and source distributions are disabled), we error.
However, we also allow users to instruct us to only lock for a subset of environments via tool.uv.environments
. So they can say, “Only lock for macOS”:
[tool.uv]
# Resolve for macOS, but not for Linux or Windows.
environments = ["sys_platform == 'darwin'"]
(The environments listed in tool.uv.environments
must be disjoint.)
If tool.uv.environments
is specified, we include that in the lockfile. And at install-time, we determine whether the current platform is compatible with any of the entries in tool.uv.environments
.