mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Improve missing wheel
error message with --no-build-isolation
(#4964)
Closes https://github.com/astral-sh/uv/issues/4069.
This commit is contained in:
parent
527b711bc7
commit
9307928765
1 changed files with 4 additions and 2 deletions
|
@ -151,7 +151,9 @@ impl Display for MissingHeaderCause {
|
||||||
MissingLibrary::PythonPackage(package) => {
|
MissingLibrary::PythonPackage(package) => {
|
||||||
write!(
|
write!(
|
||||||
f,
|
f,
|
||||||
"This error likely indicates that you need to `uv pip install {package}` into the build environment for {version_id}",
|
"This error likely indicates that {version_id} depends on {package}, but doesn't declare it as a build dependency. \
|
||||||
|
If {version_id} is a first-party package, consider adding {package} to its `build-system.requires`. \
|
||||||
|
Otherwise, `uv pip install {package}` into the environment and re-run with `--no-build-isolation`.",
|
||||||
package = package, version_id = self.version_id
|
package = package, version_id = self.version_id
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1239,7 +1241,7 @@ mod test {
|
||||||
"###);
|
"###);
|
||||||
insta::assert_snapshot!(
|
insta::assert_snapshot!(
|
||||||
std::error::Error::source(&err).unwrap(),
|
std::error::Error::source(&err).unwrap(),
|
||||||
@"This error likely indicates that you need to `uv pip install wheel` into the build environment for pygraphviz-1.11"
|
@"This error likely indicates that pygraphviz-1.11 depends on wheel, but doesn't declare it as a build dependency. If pygraphviz-1.11 is a first-party package, consider adding wheel to its `build-system.requires`. Otherwise, `uv pip install wheel` into the environment and re-run with `--no-build-isolation`."
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue