mirror of https://github.com/astral-sh/uv
Add docs
This commit is contained in:
parent
99e4046c83
commit
38f1d1adb0
|
|
@ -211,6 +211,7 @@ fn validate_uv_toml(path: &Path, options: &Options) -> Result<(), Error> {
|
|||
override_dependencies: _,
|
||||
constraint_dependencies: _,
|
||||
build_constraint_dependencies: _,
|
||||
build_dependencies_metadata: _,
|
||||
environments,
|
||||
required_environments,
|
||||
conflicts,
|
||||
|
|
@ -362,6 +363,7 @@ fn warn_uv_toml_masked_fields(options: &Options) {
|
|||
managed: _,
|
||||
package: _,
|
||||
build_backend: _,
|
||||
build_dependencies_metadata: _,
|
||||
} = options;
|
||||
|
||||
let mut masked_fields = vec![];
|
||||
|
|
|
|||
|
|
@ -155,6 +155,9 @@ pub struct Options {
|
|||
#[cfg_attr(feature = "schemars", schemars(skip))]
|
||||
pub r#package: Option<serde::de::IgnoredAny>,
|
||||
|
||||
#[cfg_attr(feature = "schemars", schemars(skip))]
|
||||
pub build_dependencies_metadata: Option<serde::de::IgnoredAny>,
|
||||
|
||||
#[cfg_attr(feature = "schemars", schemars(skip))]
|
||||
pub build_backend: Option<serde::de::IgnoredAny>,
|
||||
}
|
||||
|
|
@ -2142,6 +2145,7 @@ pub struct OptionsWire {
|
|||
default_groups: Option<serde::de::IgnoredAny>,
|
||||
dependency_groups: Option<serde::de::IgnoredAny>,
|
||||
dev_dependencies: Option<serde::de::IgnoredAny>,
|
||||
build_dependencies_metadata: Option<serde::de::IgnoredAny>,
|
||||
|
||||
// Build backend
|
||||
build_backend: Option<serde::de::IgnoredAny>,
|
||||
|
|
@ -2208,6 +2212,7 @@ impl From<OptionsWire> for Options {
|
|||
sources,
|
||||
default_groups,
|
||||
dependency_groups,
|
||||
build_dependencies_metadata,
|
||||
extra_build_dependencies,
|
||||
extra_build_variables,
|
||||
dev_dependencies,
|
||||
|
|
@ -2293,6 +2298,7 @@ impl From<OptionsWire> for Options {
|
|||
dependency_groups,
|
||||
managed,
|
||||
package,
|
||||
build_dependencies_metadata,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -428,6 +428,19 @@ pub struct ToolUv {
|
|||
)]
|
||||
pub dependency_groups: Option<ToolUvDependencyGroups>,
|
||||
|
||||
/// Metadata for build dependencies.
|
||||
///
|
||||
/// This allows specifying metadata for build dependencies, such as runtime matching.
|
||||
#[option(
|
||||
default = "None",
|
||||
value_type = "dict",
|
||||
example = r#"
|
||||
[build-dependencies-metadata.package1]
|
||||
match-runtime = true
|
||||
"#
|
||||
)]
|
||||
pub build_dependencies_metadata: Option<BuildDependenciesMetadata>,
|
||||
|
||||
/// Additional build dependencies for packages.
|
||||
///
|
||||
/// This allows extending the PEP 517 build environment for the project's dependencies with
|
||||
|
|
@ -846,6 +859,16 @@ impl From<ExtraBuildDependency> for ExtraBuildDependencyWire {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
pub struct BuildDependenciesMetadata(BTreeMap<PackageName, BuildDependencyMetadata>);
|
||||
|
||||
#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
pub struct BuildDependencyMetadata {
|
||||
pub match_runtime: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize)]
|
||||
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
|
||||
pub struct ExtraBuildDependencies(BTreeMap<PackageName, Vec<ExtraBuildDependency>>);
|
||||
|
|
|
|||
Loading…
Reference in New Issue