Skip to content

Commit c961156

Browse files
committed
Revert to using pipx to avoid Python3 version differences
1 parent 6f92928 commit c961156

File tree

2 files changed

+26
-22
lines changed

2 files changed

+26
-22
lines changed

docker/debian/Dockerfile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,24 @@ RUN set -ex ;\
3030
# Install tools that are shared by all stages.
3131
RUN <<EOF
3232
pkgs=()
33-
pkgs+=(build-essential) # Required build tools.
34-
pkgs+=(ca-certificates) # Enable TLS verification for HTTPS connections by providing trusted root certificates.
35-
pkgs+=(cmake) # Required build tool.
36-
pkgs+=(curl) # Dependency for tools requiring downloading data.
37-
pkgs+=(git) # Required build tool.
38-
pkgs+=(gpg) # Dependency for tools requiring signing or encrypting/decrypting.
39-
pkgs+=(jq) # Pretty printing.
40-
pkgs+=(ninja-build) # Required build tool.
41-
pkgs+=(python3-pip) # Dependency to install Conan.
42-
pkgs+=(python-is-python3) # Make python point to python3.
33+
pkgs+=(build-essential) # Required build tools.
34+
pkgs+=(ca-certificates) # Enable TLS verification for HTTPS connections by providing trusted root certificates.
35+
pkgs+=(cmake) # Required build tool.
36+
pkgs+=(curl) # Dependency for tools requiring downloading data.
37+
pkgs+=(git) # Required build tool.
38+
pkgs+=(gpg) # Dependency for tools requiring signing or encrypting/decrypting.
39+
pkgs+=(jq) # Pretty printing.
40+
pkgs+=(ninja-build) # Required build tool.
41+
pkgs+=(pipx) # Package manager for Python applications.
4342
apt install -y "${pkgs[@]}"
4443
EOF
4544

4645
# Install Conan.
4746
ARG CONAN_VERSION=2.17.0
48-
RUN pip install conan==${CONAN_VERSION} --break-system-packages
47+
RUN PIPX_HOME=/opt/pipx \
48+
PIPX_BIN_DIR=/usr/bin \
49+
PIPX_MAN_DIR=/usr/share/man \
50+
pipx install conan==${CONAN_VERSION}
4951

5052
# Create the user to switch to, once all packages have been installed.
5153
ARG NONROOT_USER=ci

docker/ubuntu/Dockerfile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,24 @@ RUN set -ex ;\
2121
# Install tools that are shared by all stages.
2222
RUN <<EOF
2323
pkgs=()
24-
pkgs+=(build-essential) # Required build tools.
25-
pkgs+=(ca-certificates) # Enable TLS verification for HTTPS connections by providing trusted root certificates.
26-
pkgs+=(cmake) # Required build tool.
27-
pkgs+=(curl) # Dependency for tools requiring downloading data.
28-
pkgs+=(git) # Required build tool.
29-
pkgs+=(gpg) # Dependency for tools requiring signing or encrypting/decrypting.
30-
pkgs+=(jq) # Pretty printing.
31-
pkgs+=(ninja-build) # Required build tool.
32-
pkgs+=(python3-pip) # Dependency to install Conan.
33-
pkgs+=(python-is-python3) # Make python point to python3.
24+
pkgs+=(build-essential) # Required build tools.
25+
pkgs+=(ca-certificates) # Enable TLS verification for HTTPS connections by providing trusted root certificates.
26+
pkgs+=(cmake) # Required build tool.
27+
pkgs+=(curl) # Dependency for tools requiring downloading data.
28+
pkgs+=(git) # Required build tool.
29+
pkgs+=(gpg) # Dependency for tools requiring signing or encrypting/decrypting.
30+
pkgs+=(jq) # Pretty printing.
31+
pkgs+=(ninja-build) # Required build tool.
32+
pkgs+=(pipx) # Package manager for Python applications.
3433
apt install -y "${pkgs[@]}"
3534
EOF
3635

3736
# Install Conan.
3837
ARG CONAN_VERSION=2.17.0
39-
RUN pip install conan==${CONAN_VERSION} --break-system-packages
38+
RUN PIPX_HOME=/opt/pipx \
39+
PIPX_BIN_DIR=/usr/bin \
40+
PIPX_MAN_DIR=/usr/share/man \
41+
pipx install conan==${CONAN_VERSION}
4042

4143
# Create the user to switch to, once all packages have been installed.
4244
ARG NONROOT_USER=ci

0 commit comments

Comments
 (0)