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 a handleless label: it is addressable (exportable from a BUILD.js) and other labels reference it via .data, but it attaches no goal handlers of its own — a pythonApp()/pythonTest()/pythonSources() label reads its path/flavors directly rather than the engine tracking a declared dependency edge. The selected flavor is default unless the resolve declares more than one flavor, in which case --axis python=<name> (or a named profile) selects it.

pythonResolveSyncArgs()

pythonResolveSyncArgs(resolve)

Return the uv sync arguments for this resolve under the active mode.