Skip to content

Commit

Permalink
Package uv
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpdp7 committed Oct 14, 2024
1 parent f68f07c commit 961a6c5
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions repo/uv.ubpkg.sky
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
gh = github_repo("astral-sh/uv")

release = gh.latest_release()

os_str = {
"linux": "unknown-linux-gnu",
"macos": "apple-darwin",
"windows": "pc-windows-msvc",
}[os]

archive_format = {
"linux": "tar.gz",
"macos": "tar.gz",
"windows": "zip",
}[os]

asset = release.get_asset_url("uv-{arch}-{os_str}.{archive_format}".format(arch=arch, os_str=os_str, archive_format=archive_format))

install_binary(extract_from_url(asset, "uv-{arch}-{os_str}/uv".format(arch=arch, os_str=os_str)), "uv")
install_binary(extract_from_url(asset, "uv-{arch}-{os_str}/uvx".format(arch=arch, os_str=os_str)), "uvx")

0 comments on commit 961a6c5

Please sign in to comment.