Skip to content

Commit caef8fa

Browse files
committed
Simplify PIP package update process
- Remove system dependency installation for PIP updates - Limit PIP update to upgrading pip itself - Streamline the update script by removing complex package upgrade logic
1 parent b7feec0 commit caef8fa

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

scripts/update_packages.sh

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -102,34 +102,11 @@ if command -v pnpm &> /dev/null; then
102102
fi
103103

104104
if command -v pip &> /dev/null; then
105-
echo "Updating PIP and all installed Python packages..."
106-
107-
# Upgrade PIP itself first
105+
echo "Updating PIP..."
108106
python3 -m pip install --upgrade pip
109-
110-
# Install system dependencies to prevent errors
111-
if command -v apt &> /dev/null; then
112-
sudo apt install -y cmake pkg-config libvirt-dev libpq-dev gobject-introspection
113-
elif command -v dnf &> /dev/null; then
114-
sudo dnf install -y cmake pkgconf-pkg-config libvirt-devel postgresql-devel gobject-introspection
115-
elif command -v pacman &> /dev/null; then
116-
sudo pacman -S --needed --noconfirm cmake pkg-config libvirt postgresql-libs gobject-introspection
117-
fi
118-
119-
# Get a list of outdated packages and upgrade them
120-
outdated_packages=$(pip list --outdated --format=columns | awk 'NR>2 {print $1}')
121-
122-
if [ -n "$outdated_packages" ]; then
123-
echo "Upgrading: $outdated_packages"
124-
echo "$outdated_packages" | xargs -n1 python3 -m pip install --upgrade
125-
else
126-
echo "All PIP packages are up to date."
127-
fi
128107
fi
129108

130109

131-
132-
133110
if command -v poetry &> /dev/null; then
134111
echo "Updating Poetry packages..."
135112
poetry self update

0 commit comments

Comments
 (0)