|
47 | 47 | # Step 2: Define essential system dependencies |
48 | 48 | # ------------------------------ |
49 | 49 | if [ "$DISTRO" = "arch" ]; then |
50 | | - DEPENDENCIES=(python python-pip git curl wget) |
| 50 | + DEPENDENCIES=(python python-pip python-pipx git curl wget) |
51 | 51 | elif [ "$DISTRO" = "opensuse" ]; then |
52 | 52 | # openSUSE includes venv in the base python3 package |
53 | | - DEPENDENCIES=(python3 python3-pip git curl wget) |
| 53 | + DEPENDENCIES=(python3 python3-pip python3-pipx git curl wget) |
54 | 54 | else |
55 | | - DEPENDENCIES=(python3 python3-pip python3-venv git curl wget) |
| 55 | + # For Fedora, Ubuntu/Debian and other distros |
| 56 | + DEPENDENCIES=(python3 python3-pip python3-pipx python3-venv git curl wget) |
56 | 57 | fi |
57 | 58 |
|
58 | 59 | install_package() { |
@@ -87,14 +88,14 @@ for pkg in "${DEPENDENCIES[@]}"; do |
87 | 88 | done |
88 | 89 |
|
89 | 90 | # ------------------------------ |
90 | | -# Step 5: Install pipx if missing |
| 91 | +# Step 5: Ensure pipx path is configured |
91 | 92 | # ------------------------------ |
92 | | -if ! command -v pipx &> /dev/null; then |
93 | | - echo "[*] Installing pipx..." |
94 | | - python3 -m pip install --user pipx |
95 | | - python3 -m pipx ensurepath |
| 93 | +if command -v pipx &> /dev/null; then |
| 94 | + echo "[*] pipx is installed. Ensuring PATH is configured..." |
| 95 | + pipx ensurepath |
96 | 96 | else |
97 | | - echo "[*] pipx is already installed." |
| 97 | + echo "[!] pipx installation failed. Please install it manually for your distribution." |
| 98 | + exit 1 |
98 | 99 | fi |
99 | 100 |
|
100 | 101 | # ------------------------------ |
|
0 commit comments