Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[connectedhomeip] Upgrade python version to 3.10 #12533

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions projects/connectedhomeip/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,25 @@ FROM gcr.io/oss-fuzz-base/base-builder
# See connectedhomeip/docs/guides/BUILDING.md#prerequisites
RUN apt-get update && \
apt-get install -y pkg-config libssl-dev libdbus-1-dev libglib2.0-dev \
libavahi-client-dev ninja-build python3-venv python3-dev python3-pip \
unzip libgirepository1.0-dev libcairo2-dev libreadline-dev
libavahi-client-dev ninja-build \
unzip libgirepository1.0-dev libcairo2-dev libreadline-dev

# Installing Python3.10 and using it instead of the default Python taken from the base-builder image
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y pkg-config python3.10 python3.10-dev python3.10-venv && \
ln --force -s /usr/bin/python3.10 /usr/bin/python3

# Ensure python that was just installed gets precedence over
# the one already installed in /usr/local/bin
ENV PATH="/usr/bin/:${PATH}"

# This fixes setuptools bug related to version 71
# https://github.com/pypa/setuptools/issues/4483
RUN pip install -U packaging
RUN python3 -m ensurepip --upgrade

# PEP-517 needed for cryptography. Update pip
RUN pip3 install --upgrade pip setuptools wheel
RUN python3 -m pip install --upgrade pip setuptools wheel

# Install Rust for building `cryptography` python package when bootstraping pigweed
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
Expand Down