Adds Python support via mise version manager
Integrates Python as a selectable component alongside existing Node.js and Erlang options Updates component descriptions to reflect mise's expanded language support Includes pip upgrade during Python installation for package management Fixes Tidewave CLI download URL and architecture detection for improved reliability
This commit is contained in:
parent
70c2559d40
commit
77093a0ce6
1 changed files with 33 additions and 12 deletions
45
setup_env.sh
45
setup_env.sh
|
|
@ -284,11 +284,12 @@ if [[ "$(uname -s)" == "Darwin" ]]; then
|
||||||
|
|
||||||
# ---- Interactive component selection ----
|
# ---- Interactive component selection ----
|
||||||
# Component IDs and descriptions
|
# Component IDs and descriptions
|
||||||
COMP_IDS=(postgresql mise node erlang chromium vnc ollama claude opencode playwright plugins)
|
COMP_IDS=(postgresql mise node python erlang chromium vnc ollama claude opencode playwright plugins)
|
||||||
COMP_NAMES=(
|
COMP_NAMES=(
|
||||||
"PostgreSQL"
|
"PostgreSQL"
|
||||||
"mise"
|
"mise"
|
||||||
"Node.js (LTS)"
|
"Node.js (LTS)"
|
||||||
|
"Python (latest)"
|
||||||
"Erlang/Elixir"
|
"Erlang/Elixir"
|
||||||
"Chromium"
|
"Chromium"
|
||||||
"VNC + XFCE"
|
"VNC + XFCE"
|
||||||
|
|
@ -300,8 +301,9 @@ if [[ "$(uname -s)" == "Darwin" ]]; then
|
||||||
)
|
)
|
||||||
COMP_DESCS=(
|
COMP_DESCS=(
|
||||||
"Database server for local development"
|
"Database server for local development"
|
||||||
"Version manager for Node.js, Erlang, Elixir"
|
"Version manager for Node.js, Python, Erlang, Elixir"
|
||||||
"JavaScript runtime (required for Claude/OpenCode)"
|
"JavaScript runtime (required for Claude/OpenCode)"
|
||||||
|
"Python runtime managed by mise"
|
||||||
"BEAM VM + Elixir functional language"
|
"BEAM VM + Elixir functional language"
|
||||||
"Browser for automation and testing"
|
"Browser for automation and testing"
|
||||||
"Remote desktop for browser-based login flows"
|
"Remote desktop for browser-based login flows"
|
||||||
|
|
@ -931,6 +933,15 @@ install_node() {
|
||||||
export PATH="$HOME/.local/share/mise/shims:$PATH"
|
export PATH="$HOME/.local/share/mise/shims:$PATH"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_python() {
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
eval "$(~/.local/bin/mise activate bash)"
|
||||||
|
mise use -g python@latest
|
||||||
|
export PATH="$HOME/.local/share/mise/shims:$PATH"
|
||||||
|
# Ensure pip is available via mise python
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
}
|
||||||
|
|
||||||
install_erlang() {
|
install_erlang() {
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
eval "$(~/.local/bin/mise activate bash)"
|
eval "$(~/.local/bin/mise activate bash)"
|
||||||
|
|
@ -1094,17 +1105,22 @@ install_tidewave() {
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Download Tidewave CLI binary
|
# Download Tidewave CLI binary from tidewave_app releases
|
||||||
local arch
|
# Binary naming: tidewave-cli-<arch>-unknown-linux-musl
|
||||||
arch=$(detect_architecture)
|
local machine_arch
|
||||||
|
machine_arch=$(uname -m)
|
||||||
local tidewave_arch=""
|
local tidewave_arch=""
|
||||||
case "$arch" in
|
case "$machine_arch" in
|
||||||
amd64) tidewave_arch="x86_64-unknown-linux-gnu" ;;
|
x86_64) tidewave_arch="x86_64" ;;
|
||||||
arm64) tidewave_arch="aarch64-unknown-linux-gnu" ;;
|
aarch64) tidewave_arch="aarch64" ;;
|
||||||
|
*)
|
||||||
|
log_error "Unsupported architecture for Tidewave: $machine_arch"
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Get latest release URL from GitHub
|
# Get latest release URL from GitHub (tidewave_app repo)
|
||||||
local release_url="https://github.com/tidewave-ai/tidewave/releases/latest/download/tidewave-${tidewave_arch}"
|
local release_url="https://github.com/tidewave-ai/tidewave_app/releases/latest/download/tidewave-cli-${tidewave_arch}-unknown-linux-musl"
|
||||||
|
|
||||||
# Security: Download to temp file first, validate, then install
|
# Security: Download to temp file first, validate, then install
|
||||||
local temp_file
|
local temp_file
|
||||||
|
|
@ -1296,6 +1312,7 @@ register_step "base" "System packages (git, build tools, curl)"
|
||||||
register_step "postgresql" "PostgreSQL database server"
|
register_step "postgresql" "PostgreSQL database server"
|
||||||
register_step "mise" "mise version manager"
|
register_step "mise" "mise version manager"
|
||||||
register_step "node" "Node.js LTS runtime"
|
register_step "node" "Node.js LTS runtime"
|
||||||
|
register_step "python" "Python (mise-managed)"
|
||||||
register_step "erlang" "Erlang/OTP VM"
|
register_step "erlang" "Erlang/OTP VM"
|
||||||
register_step "elixir" "Elixir language"
|
register_step "elixir" "Elixir language"
|
||||||
register_step "chromium" "Chromium browser"
|
register_step "chromium" "Chromium browser"
|
||||||
|
|
@ -1311,6 +1328,7 @@ register_step "plugins" "Claude Code plugins"
|
||||||
should_skip "postgresql" && skip_step "postgresql"
|
should_skip "postgresql" && skip_step "postgresql"
|
||||||
should_skip "mise" && skip_step "mise"
|
should_skip "mise" && skip_step "mise"
|
||||||
should_skip "node" && skip_step "node"
|
should_skip "node" && skip_step "node"
|
||||||
|
should_skip "python" && skip_step "python"
|
||||||
should_skip "erlang" && skip_step "erlang"
|
should_skip "erlang" && skip_step "erlang"
|
||||||
should_skip "chromium" && skip_step "chromium"
|
should_skip "chromium" && skip_step "chromium"
|
||||||
should_skip "vnc" && skip_step "vnc"
|
should_skip "vnc" && skip_step "vnc"
|
||||||
|
|
@ -1326,9 +1344,11 @@ should_skip "plugins" && skip_step "plugins"
|
||||||
# Tidewave skipped if Erlang skipped (it's for Phoenix/Elixir projects)
|
# Tidewave skipped if Erlang skipped (it's for Phoenix/Elixir projects)
|
||||||
[ "${STEP_STATUS[erlang]}" = "skipped" ] && skip_step "tidewave"
|
[ "${STEP_STATUS[erlang]}" = "skipped" ] && skip_step "tidewave"
|
||||||
|
|
||||||
|
# Python skipped if mise skipped
|
||||||
|
[ "${STEP_STATUS[mise]}" = "skipped" ] && skip_step "python"
|
||||||
|
|
||||||
# Claude/OpenCode/Playwright skipped if Node skipped
|
# Claude/OpenCode/Playwright skipped if Node skipped
|
||||||
if [ "${STEP_STATUS[node]}" = "skipped" ]; then
|
if [ "${STEP_STATUS[node]}" = "skipped" ]; then
|
||||||
[ "${STEP_STATUS[mise]}" = "skipped" ] || true # mise can still install
|
|
||||||
skip_step "claude"
|
skip_step "claude"
|
||||||
skip_step "opencode"
|
skip_step "opencode"
|
||||||
skip_step "playwright"
|
skip_step "playwright"
|
||||||
|
|
@ -1369,10 +1389,11 @@ run_step_sync "base" install_base_deps || true
|
||||||
wait_for_running_steps
|
wait_for_running_steps
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
# Phase 3: Node + Erlang (parallel, both need mise)
|
# Phase 3: Node + Python + Erlang (parallel, all need mise)
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
if [ "${STEP_STATUS[mise]}" = "done" ]; then
|
if [ "${STEP_STATUS[mise]}" = "done" ]; then
|
||||||
[ "${STEP_STATUS[node]}" != "skipped" ] && start_step "node" install_node
|
[ "${STEP_STATUS[node]}" != "skipped" ] && start_step "node" install_node
|
||||||
|
[ "${STEP_STATUS[python]}" != "skipped" ] && start_step "python" install_python
|
||||||
[ "${STEP_STATUS[erlang]}" != "skipped" ] && start_step "erlang" install_erlang
|
[ "${STEP_STATUS[erlang]}" != "skipped" ] && start_step "erlang" install_erlang
|
||||||
wait_for_running_steps
|
wait_for_running_steps
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue