diff mbox series

[09/10] CI: use a venv for sphinx

Message ID 20230929152128.3401009-9-ross.burton@arm.com
State New
Headers show
Series [01/10] arm/apply_local_src_patches: allow use in multiple directories | expand

Commit Message

Ross Burton Sept. 29, 2023, 3:21 p.m. UTC
From: Ross Burton <ross.burton@arm.com>

The Kas container in version 4 onwards is based on Debian 12, which
forbids pip from installing files into /usr or ~/.local/.

We want to install the arbitrary dependencies for the documentation
build, so these should be installed in a venv.

The kas container doesn't currently install python3-venv, so we have to
install that manually (patch sent upstream).

Signed-off-by: Ross Burton <ross.burton@arm.com>
 .gitlab-ci.yml | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox series


diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c750698d..7e1a77cd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -288,7 +288,14 @@  documentation:
   extends: .setup
     - |
-      sudo pip3 install -r meta-arm-bsp/documentation/requirements.txt
+      # This can be removed when the kas container has python3-venv installed
+      sudo apt-get update && sudo apt-get install --yes python3-venv
+      python3 -m venv venv
+      . ./venv/bin/activate
+      pip3 install -r meta-arm-bsp/documentation/requirements.txt
       for CONF in meta-*/documentation/*/conf.py ; do
         echo Building $CONF...
         SOURCE_DIR=$(dirname $CONF)