ci: override python user-base location

We are currently running pip as root which will cause it
to install into /root/.local cause it wants to do a user install
Set the user-base in the gloabl config, /etc/pip.conf, so pip will
both install there and subsequently look there if we invoke it
from any other user.

This makes pip install ofc require elevated permissions, as it
will be writting into /usr/local from now on

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8763>
This commit is contained in:
Jordan Petridis 2025-04-03 14:06:44 +03:00 committed by GStreamer Marge Bot
parent 59faed542e
commit fafd2bc844
3 changed files with 12 additions and 0 deletions

View File

@ -7,6 +7,7 @@ apt install -y $(<./ci/docker/debian/deps.txt)
apt remove -y rustc cargo
bash ./ci/scripts/create-pip-config.sh
pip3 install --break-system-packages meson==1.7.2 hotdoc python-gitlab tomli junitparser
apt clean all

View File

@ -28,6 +28,7 @@ dnf install -y glib2-doc gdk-pixbuf2-devel gtk3-devel-docs gtk4-devel-docs libso
# Make sure we don't end up installing these from some transient dependency
dnf remove -y "gstreamer1*-devel" rust cargo meson 'fdk-aac-free*'
bash ./ci/scripts/create-pip-config.sh
pip3 install meson==1.7.2 python-gitlab tomli junitparser bs4
pip3 install git+https://github.com/hotdoc/hotdoc.git@8c1cc997f5bc16e068710a8a8121f79ac25cbcce

View File

@ -0,0 +1,10 @@
# We are currently running pip as root which will cause it
# to install into /root/.local cause it wants to do a user install
# Set the user-base in the gloabl config, /etc/pip.conf, so pip will
# both install there and subsequently look there if we invoke it
# from any other user.
# This makes pip install ofc require elevated permissions, as it
# will be writting into /usr/local from now on
python3 -m pip config --global set global.user-base /usr/local/
# Disable the cache as we'd be removing it at the end of the image build anyway
python3 -m pip config --global set global.no-cache-dir true