Skip to content

Commit

Permalink
Use musl build for ARM Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Jul 4, 2024
1 parent 11fc495 commit 91ee442
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
17 changes: 11 additions & 6 deletions rye-devtools/src/rye_devtools/find_uv_downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ class UvDownloads:
"aarch64": "aarch64",
}

GLIBC = {
"x86_64": "gnu",
"i686": "gnu",
"aarch64": "musl",
}

PLATFORM_ENV = {
"unknown-linux-gnu": ("linux", "gnu"),
# "unknown-linux-musl": ("linux", "musl"),
"unknown-linux-musl": ("linux", "musl"),
"apple-darwin": ("macos", None),
"pc-windows-msvc": ("windows", None),
}
Expand Down Expand Up @@ -81,9 +87,10 @@ def parse_triple(cls, url: str) -> PlatformTriple | None:
if arch_str in cls.ARCH and plat_env_str in cls.PLATFORM_ENV:
arch = cls.ARCH[arch_str]
plat, env = cls.PLATFORM_ENV[plat_env_str]
return PlatformTriple(
arch=arch, platform=plat, environment=env, flavor=None
)
if env is None or env == cls.GLIBC[arch_str]:
return PlatformTriple(
arch=arch, platform=plat, environment=env, flavor=None
)

return None

Expand Down Expand Up @@ -125,8 +132,6 @@ async def async_main():
"Authorization": "Bearer " + token,
}

downloads = []

log("Fetching all uv downloads.")
async with httpx.AsyncClient(follow_redirects=True, headers=headers) as client:
finder = UvDownloads(client)
Expand Down
14 changes: 7 additions & 7 deletions rye/src/sources/generated/uv_downloads.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// To regenerate, run `rye run uv-downloads > rye/src/sources/generated/uv_downloads.inc` from the root of the repository.
use std::borrow::Cow;
pub const UV_DOWNLOADS: &[UvDownload] = &[
UvDownload {arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 0, minor: 2, patch: 17, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.17/uv-aarch64-apple-darwin.tar.gz"), sha256: Cow::Borrowed("7dc5fe97867ac3bbcbeabf32fb76b3caaf12141b5e20926ed81353f9a2ff7dcb") },
UvDownload {arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 17, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.17/uv-aarch64-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("5037a966a2422f40c63d36982d46f10362383c128ce1707a56b4339b44a50c94") },
UvDownload {arch: Cow::Borrowed("i686"), os: Cow::Borrowed("windows"), major: 0, minor: 2, patch: 17, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.17/uv-i686-pc-windows-msvc.zip"), sha256: Cow::Borrowed("ed5dc4a4341e7af3d92ef0649df6152b555b16e09c072c43f7f39b9d5bdce784") },
UvDownload {arch: Cow::Borrowed("i686"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 17, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.17/uv-i686-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("d1d478429fdaeadd56ce280bd43460275bd131cd44f9878987d9d7a5caa4f398") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 0, minor: 2, patch: 17, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.17/uv-x86_64-apple-darwin.tar.gz"), sha256: Cow::Borrowed("78137a1b9d6fd1f8f5f0d4208829dd5f89b6505c314192c0fa2a35d6faff5e91") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 0, minor: 2, patch: 17, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.17/uv-x86_64-pc-windows-msvc.zip"), sha256: Cow::Borrowed("e77465f8a964cf0cbd932af506df6ca42ce288e6db4df312c53f27b05c7c09e5") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 17, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.17/uv-x86_64-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("d49537780cd9cd5621bbc34e6864356487155cd4a7540035e1b0acb0d1017def") },
UvDownload {arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 0, minor: 2, patch: 21, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.21/uv-aarch64-apple-darwin.tar.gz"), sha256: Cow::Borrowed("5b3925fc797bc5e168b5883a5ba2ff6c5751a1c900748c132f01d1ee5c87d24e") },
UvDownload {arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 21, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.21/uv-aarch64-unknown-linux-musl.tar.gz"), sha256: Cow::Borrowed("3ae6f0de1698b257052d5b1a05809a0f17db64fb6b1e80ffc64b659840105002") },
UvDownload {arch: Cow::Borrowed("i686"), os: Cow::Borrowed("windows"), major: 0, minor: 2, patch: 21, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.21/uv-i686-pc-windows-msvc.zip"), sha256: Cow::Borrowed("7740b290f6efdfc73d24977e4dc86be144865ca92ec106cb8e0b206f7b77b80f") },
UvDownload {arch: Cow::Borrowed("i686"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 21, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.21/uv-i686-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("ec323eb0b67103da905e24de5c6ee4036da22068c439f098b93d4c206e6764b8") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 0, minor: 2, patch: 21, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.21/uv-x86_64-apple-darwin.tar.gz"), sha256: Cow::Borrowed("92eec02ae5ff8ef4b4070cf6ef787a2ee3bfc6ca910b61669a8615e2149d6595") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 0, minor: 2, patch: 21, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.21/uv-x86_64-pc-windows-msvc.zip"), sha256: Cow::Borrowed("bf4946c5a8751cc63def72aaa53a9a0c1ca015876b9ec144cc389ef4901dbc4a") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 21, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.21/uv-x86_64-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("bb6ff8fa0ac1d86a32b1ef615ec52acb5c8230f803146ad4ceeaba8aaa26a787") },
];

0 comments on commit 91ee442

Please sign in to comment.