chore: import upstream snapshot with attribution
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Has been cancelled
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Has been cancelled
CD: Docs MCP Server / build (linux/amd64) (push) Has been cancelled
CD: Docs MCP Server / build (linux/arm64) (push) Has been cancelled
CD: Docs MCP Server / merge (push) Has been cancelled
CI: cua-driver distro-compat matrix / Resolve release version (push) Has been cancelled
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Has been cancelled
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Has been cancelled
CI: cua-driver distro-compat matrix / Distro compat summary (push) Has been cancelled
CI: Rust Linux unit / Rust Linux unit and compile (push) Has been cancelled
CI: Rust Windows unit / Rust Windows unit and compile (push) Has been cancelled
CI: Nix Linux Rust source / Nix / compositor build (push) Has been cancelled
CI: Nix Linux Rust source / Nix / driver package (push) Has been cancelled
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Has been cancelled
CI: cua-driver distro-compat matrix / debian:12 (glibc 2.36) (push) Has been cancelled
CI: SPDX Headers / Check SPDX headers (warn-only) (push) Has been cancelled
CD: Docs MCP Server / build (linux/amd64) (push) Has been cancelled
CD: Docs MCP Server / build (linux/arm64) (push) Has been cancelled
CD: Docs MCP Server / merge (push) Has been cancelled
CI: cua-driver distro-compat matrix / Resolve release version (push) Has been cancelled
CI: cua-driver distro-compat matrix / fedora:41 (glibc 2.40) (push) Has been cancelled
CI: cua-driver distro-compat matrix / rockylinux:9 (glibc 2.34) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:22.04 (glibc 2.35) (push) Has been cancelled
CI: cua-driver distro-compat matrix / ubuntu:24.04 (glibc 2.39) (push) Has been cancelled
CI: cua-driver distro-compat matrix / Distro compat summary (push) Has been cancelled
CI: Rust Linux unit / Rust Linux unit and compile (push) Has been cancelled
CI: Rust Windows unit / Rust Windows unit and compile (push) Has been cancelled
CI: Nix Linux Rust source / Nix / compositor build (push) Has been cancelled
CI: Nix Linux Rust source / Nix / driver package (push) Has been cancelled
CI: Nix Linux Rust source / Nix / Rust unit tests (push) Has been cancelled
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user