rules/python/resolve.js
Developer reference: this page includes exported implementation details. BUILD authors should prefer the User API reference.
pythonResolve()
pythonResolve({ path = ".", flavors = { default: {} } } = {})
Declare a locked uv project and its selectable optional-dependency flavors. A resolve is immutable configuration shared by Python declarations. The graph tasks consume its path and flavors explicitly; the selected flavor is still default unless --axis python=<name> (or a profile) selects one.
pythonResolveSyncArgs()
pythonResolveSyncArgs(resolve, mode)
Return the uv sync arguments for this resolve under the selected mode. mode is the graph-native caller's own semantic.mode("python") input, passed explicitly so the selected flavor participates in that task's invalidation. Omitting it falls back to reading the ambient legacy axis, which is only meaningful on the legacy label path.