Skip to content

Commit 3b985cb

Browse files
andy31415austina-csa
authored andcommitted
Prepare changes for build_python.sh for ubuntu 24.04 usage (project-chip#34016)
Changes: - use `-m venv` to create the virtualenv - ensure `libgirepository1.0-dev` is installed, so that we are able to build/install pygobject
1 parent 1c542c0 commit 3b985cb

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

integrations/docker/images/base/chip-build/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ RUN set -x \
5959
libdmalloc-dev \
6060
libgif-dev \
6161
libgirepository-1.0-1 \
62+
libgirepository1.0-dev \
6263
libglib2.0-dev \
6364
libical-dev \
6465
libjpeg-dev \
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
57 : [Telink] Update Docker image (Zephyr update)
1+
58 : Add libgirepository1.0-dev to the base image, to make build_python.sh work (assume we want this everywhere)

scripts/build_python.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,10 @@ if [ -n "$install_virtual_env" ]; then
222222
if [ "$clean_virtual_env" = "yes" ]; then
223223
# Create a virtual environment that has access to the built python tools
224224
echo_blue "Creating a clear VirtualEnv in '$ENVIRONMENT_ROOT' ..."
225-
virtualenv --clear "$ENVIRONMENT_ROOT"
225+
python -m venv --clear "$ENVIRONMENT_ROOT"
226226
elif [ ! -f "$ENVIRONMENT_ROOT"/bin/activate ]; then
227227
echo_blue "Creating a new VirtualEnv in '$ENVIRONMENT_ROOT' ..."
228-
virtualenv "$ENVIRONMENT_ROOT"
228+
python -m venv "$ENVIRONMENT_ROOT"
229229
fi
230230

231231
source "$ENVIRONMENT_ROOT"/bin/activate

0 commit comments

Comments
 (0)