Skip to content

Commit

Permalink
Fix all pip installations
Browse files Browse the repository at this point in the history
Latest distros do not allow global pip installation.
Python packages have to be installed in venv.

Signed-off-by: Lukasz Dorau <[email protected]>
  • Loading branch information
ldorau committed Oct 16, 2024
1 parent dc8dcf8 commit 7970796
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 8 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/bandit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ jobs:
with:
fetch-depth: 0

# Latest distros do not allow global pip installation
- name: Install Bandit
run: python3 -m pip install bandit
run: |
python3 -m venv .venv
. .venv/bin/activate
echo "$PATH" >> $GITHUB_PATH
python3 -m pip install bandit
# Run Bandit recursively, but omit _deps directory (with 3rd party code)
- name: Run Bandit
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,13 @@ jobs:
sudo apt-get update
sudo apt-get install -y cmake clang libhwloc-dev libnuma-dev libjemalloc-dev libtbb-dev
- name: Install pip packages
run: python3 -m pip install -r third_party/requirements.txt
# Latest distros do not allow global pip installation
- name: Install Python requirements in venv
run: |
python3 -m venv .venv
. .venv/bin/activate
echo "$PATH" >> $GITHUB_PATH
python3 -m pip install -r third_party/requirements.txt
- name: Configure CMake
run: >
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ jobs:
sudo apt-get update
sudo apt-get install -y doxygen
- name: Install pip requirements
run: python3 -m pip install -r third_party/requirements.txt
# Latest distros do not allow global pip installation
- name: Install Python requirements in venv
run: |
python3 -m venv .venv
. .venv/bin/activate
echo "$PATH" >> $GITHUB_PATH
python3 -m pip install -r third_party/requirements.txt
- name: Setup PATH for python
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/pr_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,13 @@ jobs:
sudo apt-get update
sudo apt-get install -y doxygen
- name: Install pip requirements
run: python3 -m pip install -r third_party/requirements.txt
# Latest distros do not allow global pip installation
- name: Install Python requirements in venv
run: |
python3 -m venv .venv
. .venv/bin/activate
echo "$PATH" >> $GITHUB_PATH
python3 -m pip install -r third_party/requirements.txt
- name: Setup PATH for python
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/qemu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,14 @@ jobs:
sudo apt-get update
sudo apt-get install -y qemu-system genisoimage qemu-utils \
libvirt-clients libvirt-daemon-system libvirt-daemon virtinst bridge-utils
pip install -r umf/scripts/qemu/requirements.txt
# Latest distros do not allow global pip installation
- name: Install Python requirements in venv
run: |
python3 -m venv .venv
. .venv/bin/activate
echo "$PATH" >> $GITHUB_PATH
python3 -m pip install -r umf/scripts/qemu/requirements.txt
- name: Add user to kvm group
run: sudo usermod -a -G kvm,libvirt $USER
Expand Down

0 comments on commit 7970796

Please sign in to comment.