91e75e620b
CI: cua-driver distro-compat matrix / Resolve release version (push) Waiting to run
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Blocked by required conditions
CI: cua-driver distro-compat matrix / Distro compat summary (push) Blocked by required conditions
CI: Nix Linux Rust source / Nix / compositor build (push) Waiting to run
CI: Nix Linux Rust source / Nix / driver package (push) Waiting to run
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Waiting to run
CI: Rust Linux unit / Rust Linux unit and compile (push) Waiting to run
CI: Rust Windows unit / Rust Windows unit and compile (push) Waiting to run
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Waiting to run
CD: Docs MCP Server / build (linux/amd64) (push) Waiting to run
CD: Docs MCP Server / build (linux/arm64) (push) Waiting to run
CD: Docs MCP Server / merge (push) Blocked by required conditions
37 lines
1.2 KiB
Bash
Executable File
37 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# Wrapper script to ensure we use the correct Python with dependencies
|
|
|
|
# Try different Python paths in order of preference
|
|
PYTHON_PATHS=(
|
|
"/Users/yellcw/Documents/GitHub/cua/.venv/bin/python"
|
|
"/opt/homebrew/bin/python3"
|
|
"/usr/local/bin/python3"
|
|
"python3"
|
|
)
|
|
|
|
# Find the first Python that has the required packages
|
|
for python_path in "${PYTHON_PATHS[@]}"; do
|
|
if command -v "$python_path" >/dev/null 2>&1; then
|
|
# Check if it has the required packages
|
|
if "$python_path" -c "import mcp, anyio" >/dev/null 2>&1; then
|
|
echo "Using Python: $python_path" >&2
|
|
exec "$python_path" "$@"
|
|
fi
|
|
fi
|
|
done
|
|
|
|
# If no Python with packages found, try to install them
|
|
echo "No Python with required packages found. Attempting to install..." >&2
|
|
for python_path in "${PYTHON_PATHS[@]}"; do
|
|
if command -v "$python_path" >/dev/null 2>&1; then
|
|
echo "Installing packages with: $python_path" >&2
|
|
if "$python_path" -m pip install mcp anyio cua-agent[all] cua-computer >/dev/null 2>&1; then
|
|
echo "Packages installed successfully with: $python_path" >&2
|
|
exec "$python_path" "$@"
|
|
fi
|
|
fi
|
|
done
|
|
|
|
echo "Failed to find or install Python with required packages" >&2
|
|
exit 1
|