Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/uv/src/commands/python/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down
33 changes: 33 additions & 0 deletions crates/uv/tests/it/python_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Loading