Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use musl build for ARM Linux #1192

Merged
merged 1 commit into from
Jul 7, 2024
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
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: 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-gnu.tar.gz"), sha256: Cow::Borrowed("77ff74dcda1e08d757632eee8c6aa3928d1e52dddb460056a0c7224c888d2956") },
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") },
UvDownload {arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 0, minor: 2, patch: 22, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.22/uv-aarch64-apple-darwin.tar.gz"), sha256: Cow::Borrowed("ed44fcb929f8cef958ed9e6de350d542f7392a43331d3605c4fcbf418e204c5c") },
UvDownload {arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 22, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.22/uv-aarch64-unknown-linux-musl.tar.gz"), sha256: Cow::Borrowed("1855c439577523fd2a3e1afb19712fd80eb59d63c92fa29d24afb7f68c8ba88c") },
UvDownload {arch: Cow::Borrowed("i686"), os: Cow::Borrowed("windows"), major: 0, minor: 2, patch: 22, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.22/uv-i686-pc-windows-msvc.zip"), sha256: Cow::Borrowed("aa5b36bdc88a16c92d5ca93c4a9325bb82eb875507d363ec28cb6e5ee694e8ed") },
UvDownload {arch: Cow::Borrowed("i686"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 22, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.22/uv-i686-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("00002ada635ce3f17a97a4eca7361eb6ac065db342540dc31e743920a723b92f") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 0, minor: 2, patch: 22, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.22/uv-x86_64-apple-darwin.tar.gz"), sha256: Cow::Borrowed("cb03b461250b688e39b19feaa0853d842e5d4193e262c9d4db2d15faafc54dcc") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 0, minor: 2, patch: 22, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.22/uv-x86_64-pc-windows-msvc.zip"), sha256: Cow::Borrowed("6ab3ed27e38e3a2c4a3a4880b87b8d607fa14589860aebbb1a34064d792d54ad") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 22, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.22/uv-x86_64-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("65cd2e2c3660779f8a1fb02eac488b540d1ae30f3a80a381f8a7859d0b76bf06") },
];