mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-18 15:06:05 +00:00
40 lines
957 B
Bash
Executable File
40 lines
957 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
# @description Install Python libraries via uv pip (tools are managed by mise).
|
|
#
|
|
# shellcheck source=shared.sh
|
|
source "$DOTFILES/config/shared.sh"
|
|
|
|
msgr run "Starting to install Python libraries"
|
|
|
|
# Ensure uv is available
|
|
if ! command -v uv &> /dev/null; then
|
|
msgr err "uv not found — install it via mise first"
|
|
exit 1
|
|
fi
|
|
|
|
# Library packages — installed into system Python with `uv pip install --system`
|
|
libraries=(
|
|
libtmux # Python API for tmux
|
|
pynvim # Neovim Python client
|
|
)
|
|
|
|
# Function to install library packages via uv pip install
|
|
install_libraries()
|
|
{
|
|
for pkg in "${libraries[@]}"; do
|
|
# Strip inline comments and trim whitespace
|
|
pkg="${pkg%%#*}"
|
|
pkg="${pkg// /}"
|
|
[[ -z "$pkg" ]] && continue
|
|
|
|
msgr nested "Installing library: $pkg"
|
|
uv pip install --system --upgrade "$pkg"
|
|
echo ""
|
|
done
|
|
return 0
|
|
}
|
|
|
|
install_libraries
|
|
msgr yay "Python library installations complete"
|