mirror of
https://github.com/astral-sh/uv
synced 2026-06-21 13:47:25 +00:00
Fix tool editable policy after rebase
This commit is contained in:
@@ -371,6 +371,11 @@ impl Tool {
|
||||
&self.requirements
|
||||
}
|
||||
|
||||
/// Return the primary requirement for the tool itself.
|
||||
pub fn target_requirement(&self) -> Option<&Requirement> {
|
||||
self.requirements.first()
|
||||
}
|
||||
|
||||
pub fn constraints(&self) -> &[Requirement] {
|
||||
&self.constraints
|
||||
}
|
||||
|
||||
@@ -699,7 +699,7 @@ pub(crate) async fn install(
|
||||
spec.clone(),
|
||||
Modifications::Exact,
|
||||
python_platform.as_ref(),
|
||||
SourceTreeEditablePolicy::Respect,
|
||||
SourceTreeEditablePolicy::Tool,
|
||||
Constraints::from_requirements(build_constraints.iter().cloned()),
|
||||
ExtraBuildRequires::default(),
|
||||
&settings,
|
||||
@@ -758,7 +758,7 @@ pub(crate) async fn install(
|
||||
),
|
||||
update.environment.interpreter(),
|
||||
python_platform.as_ref(),
|
||||
SourceTreeEditablePolicy::Respect,
|
||||
SourceTreeEditablePolicy::Tool,
|
||||
Constraints::from_requirements(build_constraints.iter().cloned()),
|
||||
&settings.resolver,
|
||||
&client_builder,
|
||||
@@ -796,7 +796,7 @@ pub(crate) async fn install(
|
||||
spec.clone(),
|
||||
&interpreter,
|
||||
python_platform.as_ref(),
|
||||
SourceTreeEditablePolicy::Respect,
|
||||
SourceTreeEditablePolicy::Tool,
|
||||
Constraints::from_requirements(build_constraints.iter().cloned()),
|
||||
&settings.resolver,
|
||||
&client_builder,
|
||||
@@ -852,7 +852,7 @@ pub(crate) async fn install(
|
||||
spec,
|
||||
&interpreter,
|
||||
python_platform.as_ref(),
|
||||
SourceTreeEditablePolicy::Respect,
|
||||
SourceTreeEditablePolicy::Tool,
|
||||
Constraints::from_requirements(build_constraints.iter().cloned()),
|
||||
&settings.resolver,
|
||||
&client_builder,
|
||||
|
||||
@@ -371,7 +371,7 @@ async fn upgrade_tool(
|
||||
),
|
||||
interpreter,
|
||||
python_platform,
|
||||
SourceTreeEditablePolicy::Respect,
|
||||
SourceTreeEditablePolicy::Tool,
|
||||
build_constraints.clone(),
|
||||
&settings.resolver,
|
||||
client_builder,
|
||||
@@ -424,7 +424,7 @@ async fn upgrade_tool(
|
||||
),
|
||||
environment.environment().interpreter(),
|
||||
python_platform,
|
||||
SourceTreeEditablePolicy::Respect,
|
||||
SourceTreeEditablePolicy::Tool,
|
||||
build_constraints.clone(),
|
||||
&settings.resolver,
|
||||
client_builder,
|
||||
|
||||
@@ -415,7 +415,7 @@ fn tool_install_relative_exclude_newer_receipt_preserves_span() {
|
||||
requires-python = ">=3.12.[X]"
|
||||
|
||||
[options]
|
||||
exclude-newer = "2024-04-10T00:00:00Z"
|
||||
exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values.
|
||||
exclude-newer-span = "P3W"
|
||||
|
||||
[manifest]
|
||||
|
||||
@@ -616,7 +616,7 @@ fn tool_upgrade_recomputes_relative_exclude_newer() {
|
||||
requires-python = ">=3.12.[X]"
|
||||
|
||||
[options]
|
||||
exclude-newer = "2024-03-25T00:00:00Z"
|
||||
exclude-newer = "0001-01-01T00:00:00Z" # This has no effect and is included for backwards compatibility when using relative exclude-newer values.
|
||||
exclude-newer-span = "P3W"
|
||||
|
||||
[manifest]
|
||||
|
||||
Reference in New Issue
Block a user