Skip to content

Commit 961a6c5

Browse files
committed
Package uv
1 parent f68f07c commit 961a6c5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

repo/uv.ubpkg.sky

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
gh = github_repo("astral-sh/uv")
2+
3+
release = gh.latest_release()
4+
5+
os_str = {
6+
"linux": "unknown-linux-gnu",
7+
"macos": "apple-darwin",
8+
"windows": "pc-windows-msvc",
9+
}[os]
10+
11+
archive_format = {
12+
"linux": "tar.gz",
13+
"macos": "tar.gz",
14+
"windows": "zip",
15+
}[os]
16+
17+
asset = release.get_asset_url("uv-{arch}-{os_str}.{archive_format}".format(arch=arch, os_str=os_str, archive_format=archive_format))
18+
19+
install_binary(extract_from_url(asset, "uv-{arch}-{os_str}/uv".format(arch=arch, os_str=os_str)), "uv")
20+
install_binary(extract_from_url(asset, "uv-{arch}-{os_str}/uvx".format(arch=arch, os_str=os_str)), "uvx")

0 commit comments

Comments
 (0)