Skip to content

Commit 7970796

Browse files
committed
Fix all pip installations
Latest distros do not allow global pip installation. Python packages have to be installed in venv. Signed-off-by: Lukasz Dorau <lukasz.dorau@intel.com>
1 parent dc8dcf8 commit 7970796

File tree

5 files changed

+35
-8
lines changed

5 files changed

+35
-8
lines changed

.github/workflows/bandit.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@ jobs:
2727
with:
2828
fetch-depth: 0
2929

30+
# Latest distros do not allow global pip installation
3031
- name: Install Bandit
31-
run: python3 -m pip install bandit
32+
run: |
33+
python3 -m venv .venv
34+
. .venv/bin/activate
35+
echo "$PATH" >> $GITHUB_PATH
36+
python3 -m pip install bandit
3237
3338
# Run Bandit recursively, but omit _deps directory (with 3rd party code)
3439
- name: Run Bandit

.github/workflows/codeql.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,13 @@ jobs:
7575
sudo apt-get update
7676
sudo apt-get install -y cmake clang libhwloc-dev libnuma-dev libjemalloc-dev libtbb-dev
7777
78-
- name: Install pip packages
79-
run: python3 -m pip install -r third_party/requirements.txt
78+
# Latest distros do not allow global pip installation
79+
- name: Install Python requirements in venv
80+
run: |
81+
python3 -m venv .venv
82+
. .venv/bin/activate
83+
echo "$PATH" >> $GITHUB_PATH
84+
python3 -m pip install -r third_party/requirements.txt
8085
8186
- name: Configure CMake
8287
run: >

.github/workflows/docs.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ jobs:
2929
sudo apt-get update
3030
sudo apt-get install -y doxygen
3131
32-
- name: Install pip requirements
33-
run: python3 -m pip install -r third_party/requirements.txt
32+
# Latest distros do not allow global pip installation
33+
- name: Install Python requirements in venv
34+
run: |
35+
python3 -m venv .venv
36+
. .venv/bin/activate
37+
echo "$PATH" >> $GITHUB_PATH
38+
python3 -m pip install -r third_party/requirements.txt
3439
3540
- name: Setup PATH for python
3641
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

.github/workflows/pr_push.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,13 @@ jobs:
6666
sudo apt-get update
6767
sudo apt-get install -y doxygen
6868
69-
- name: Install pip requirements
70-
run: python3 -m pip install -r third_party/requirements.txt
69+
# Latest distros do not allow global pip installation
70+
- name: Install Python requirements in venv
71+
run: |
72+
python3 -m venv .venv
73+
. .venv/bin/activate
74+
echo "$PATH" >> $GITHUB_PATH
75+
python3 -m pip install -r third_party/requirements.txt
7176
7277
- name: Setup PATH for python
7378
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

.github/workflows/qemu.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@ jobs:
2929
sudo apt-get update
3030
sudo apt-get install -y qemu-system genisoimage qemu-utils \
3131
libvirt-clients libvirt-daemon-system libvirt-daemon virtinst bridge-utils
32-
pip install -r umf/scripts/qemu/requirements.txt
32+
33+
# Latest distros do not allow global pip installation
34+
- name: Install Python requirements in venv
35+
run: |
36+
python3 -m venv .venv
37+
. .venv/bin/activate
38+
echo "$PATH" >> $GITHUB_PATH
39+
python3 -m pip install -r umf/scripts/qemu/requirements.txt
3340
3441
- name: Add user to kvm group
3542
run: sudo usermod -a -G kvm,libvirt $USER

0 commit comments

Comments
 (0)