craft_parts.plugins.uv_plugin module

The uv plugin.

class craft_parts.plugins.uv_plugin.UvPlugin(*, properties, part_info)[source]

Bases: BasePythonPlugin

A plugin to build python parts.

Parameters:
get_build_environment()[source]

Return a dictionary with the environment to use in the build step.

Return type:

dict[str, str]

properties_class

alias of UvPluginProperties

validator_class

alias of UvPluginEnvironmentValidator

class craft_parts.plugins.uv_plugin.UvPluginEnvironmentValidator(*, part_name, env, properties)[source]

Bases: PluginEnvironmentValidator

Check the execution environment for the uv plugin.

Parameters:
  • part_name (str) – The part whose build environment is being validated.

  • env (str) – A string containing the build step environment setup.

  • properties (PluginProperties)

validate_environment(*, part_dependencies=None)[source]

Ensure the environment has the dependencies to build uv applications.

Parameters:

part_dependencies (Optional[list[str]]) – A list of the parts this part depends on.

Return type:

None

class craft_parts.plugins.uv_plugin.UvPluginProperties(**data)[source]

Bases: PluginProperties

The part properties used by the uv plugin.

Parameters:

data (Any)

model_config: ClassVar[ConfigDict] = {'alias_generator': <function PluginProperties.<lambda>>, 'extra': 'forbid', 'frozen': True, 'validate_assignment': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

plugin: Literal['uv']
source: str
uv_extras: set[str]
uv_groups: set[str]