Skip to content

Commit e49c3dd

Browse files
Adapt Python handling for Ubuntu 24.04
The system pip and setuptools are fine. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
1 parent 643fe68 commit e49c3dd

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

resources/docker_files/ubuntu-24.04/Dockerfile

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ RUN apt-get update -q && apt-get install -yq \
100100
# to install several Python packages (done by individual jobs)
101101
python3-pip \
102102
# to install several Python packages (done by individual jobs)
103+
python3-setuptools \
104+
# to install several Python packages (done by individual jobs)
103105
python3-venv \
104106
# provides some useful scripts for adding and removing repositories
105107
software-properties-common \
@@ -316,16 +318,12 @@ RUN git clone --branch uncrustify-0.75.1 https://github.com/uncrustify/uncrustif
316318
cd uncrustify && mkdir build && cd build && cmake .. && make install && \
317319
cd .. && rm -rf uncrustify
318320

319-
# Install Python pip packages
320-
#
321-
# The pip wrapper scripts can get out of sync with pip due to upgrading it
322-
# outside the package manager, so invoke the module directly.
321+
# Prepare Python.
322+
# The tooling that comes with the operating system is good enough.
323323
RUN python3 -m pip config set global.progress_bar off && \
324-
python3 -m pip install setuptools --upgrade && \
325-
true
326-
327-
#Upgrade pip to the latest version
328-
RUN python3 -m pip install --upgrade pip
324+
# Instruct pip that it's ok to install packages as a user
325+
# (either "user" or the developer who runs "docker -u ...").
326+
python3 -m pip config set global.break-system-packages true
329327

330328
# Make sure we have a UTF-8 locale
331329
RUN locale && \

0 commit comments

Comments
 (0)