Skip to content

Commit

Permalink
get-pip if not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
yasirroni committed Jun 25, 2024
1 parent e27db77 commit a5a3288
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/scripts/update_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ install_python() {
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install -y python${version}
sudo apt-get install -y python${version} python${version}-venv
else
echo "Python ${version} is already installed."
fi
Expand All @@ -32,6 +32,13 @@ for version in "${PYTHON_VERSIONS[@]}"; do
python${version} -m venv "env_${version}"
source "env_${version}/bin/activate"

# Install pip using get-pip.py if it's not already installed
if ! command -v pip &> /dev/null; then
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
rm get-pip.py
fi

# Ensure pip is up-to-date within the virtual environment
pip install --upgrade pip

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update Requirements
name: update

on:
pull_request:
Expand Down

0 comments on commit a5a3288

Please sign in to comment.