feat: install uv

This commit is contained in:
Konano 2025-11-10 18:06:46 +08:00
parent fb467cab8a
commit bae7abd09f
Signed by: Nano
GPG Key ID: 93686B78EE43A65A
4 changed files with 2104 additions and 0 deletions

View File

@ -52,6 +52,18 @@ configure_gpg() {
fi
}
configure_uv() {
# version: 0.9.8
[ -f ~/.local/bin/uv ] && return
if confirm_action "要安装 uv 吗?" "Y"; then
UV_INSTALLER_GHE_BASE_URL="$github" sh $scriptdir/files/install-uv.sh
if [ $abroad -ne 1 ]; then
cp $scriptdir/files/uv.toml ~/.config/uv/uv.toml
fi
fi
}
configure_miniconda() {
[ -d ~/.miniconda3 ] && return
[ "$offline" -eq 1 ] && return
@ -141,6 +153,7 @@ configure_ssh
configure_ssh_keygen
configure_git
configure_gpg
configure_uv
configure_miniconda
configure_miniforge
configure_nvm

2080
files/install-uv.sh Executable file

File diff suppressed because it is too large Load Diff

3
files/uv.toml Normal file
View File

@ -0,0 +1,3 @@
[index]
url = "https://pypi.tuna.tsinghua.edu.cn/simple"
default = true

View File

@ -2,3 +2,11 @@
# ZSH_THEME="robbyrussell"
# PROMPT='%(?:%{$fg_bold[green]%}:%{$fg_bold[red]%})${HOST:-} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
# if [ -f "$HOME/.local/bin/env" ]; then
# . "$HOME/.local/bin/env"
# fi
# if command_exists ipython3; then
# alias ipy='ipython3'
# fi