mirror of
https://github.com/astral-sh/uv
synced 2026-01-22 14:00:11 -05:00
Fix error message when installing musl python on armv7 (#17213)
<!-- Thank you for contributing to uv! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary Fixes #17210. ## Test Plan Added a test function. Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
committed by
GitHub
parent
98d17fc4d2
commit
4ee320b0a8
@@ -69,12 +69,12 @@ impl<'a> InstallRequest<'a> {
|
||||
Ok(download) => download,
|
||||
Err(downloads::Error::NoDownloadFound(request))
|
||||
if request.libc().is_some_and(Libc::is_musl)
|
||||
&& request
|
||||
.arch()
|
||||
.is_some_and(|arch| Arch::is_arm(&arch.inner())) =>
|
||||
&& request.arch().is_some_and(|arch| {
|
||||
arch.inner() == Arch::from(&uv_platform_tags::Arch::Armv7L)
|
||||
}) =>
|
||||
{
|
||||
return Err(anyhow::anyhow!(
|
||||
"uv does not yet provide musl Python distributions on aarch64."
|
||||
"uv does not yet provide musl Python distributions on armv7."
|
||||
));
|
||||
}
|
||||
Err(err) => return Err(err.into()),
|
||||
|
||||
@@ -3954,6 +3954,39 @@ fn python_install_upgrade_version_file() {
|
||||
");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn python_install_armv7() {
|
||||
let context: TestContext = TestContext::new_with_versions(&[])
|
||||
.with_filtered_python_keys()
|
||||
.with_managed_python_dirs()
|
||||
.with_python_download_cache()
|
||||
.with_filtered_python_sources()
|
||||
.with_filtered_python_install_bin()
|
||||
.with_filtered_python_names()
|
||||
.with_filtered_exe_suffix();
|
||||
|
||||
// Explicitly request a musl build for armv7l
|
||||
uv_snapshot!(context.filters(), context.python_install().arg("cpython-3.12.12-linux-armv7-musl"), @r###"
|
||||
success: false
|
||||
exit_code: 2
|
||||
----- stdout -----
|
||||
|
||||
----- stderr -----
|
||||
error: uv does not yet provide musl Python distributions on armv7.
|
||||
"###);
|
||||
|
||||
// Explicitly request a gnuabi build for armv7l
|
||||
uv_snapshot!(context.filters(), context.python_install().arg("cpython-3.12.12-linux-armv7-gnueabi"), @r###"
|
||||
success: true
|
||||
exit_code: 0
|
||||
----- stdout -----
|
||||
|
||||
----- stderr -----
|
||||
Installed Python 3.12.12 in [TIME]
|
||||
+ cpython-3.12.12-[PLATFORM] (python3.12)
|
||||
"###);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn python_install_compile_bytecode() -> anyhow::Result<()> {
|
||||
fn count_files_by_ext(dir: &Path, extension: &str) -> anyhow::Result<usize> {
|
||||
|
||||
Reference in New Issue
Block a user