rules/python/runtime.js

Developer reference: this page includes exported implementation details. BUILD authors should prefer the User API reference.

pythonRuntime()

pythonRuntime(version)

Register the version of Python that uv run --managed-python should launch when pythonApp() isn't given an explicit pythonVersion. Last call wins, mirroring uvToolchain()/pexToolchain()'s { default: true } intent, but there is no non-default variant to register — nothing else ever looks up a python version by name, so this is a single overwritable default.

ParameterTypeDescription
versionstring

defaultPythonRuntimeVersion()

defaultPythonRuntimeVersion()

Returns: string|null