Skip to content

Commit

Permalink
Prepare changes for build_python.sh for ubuntu 24.04 usage (#34016)
Browse files Browse the repository at this point in the history
Changes:
  - use `-m venv` to create the virtualenv
  - ensure `libgirepository1.0-dev` is installed, so that we are able to
    build/install pygobject
  • Loading branch information
andy31415 authored Jun 19, 2024
1 parent 1bf70b6 commit 1ae130f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions integrations/docker/images/base/chip-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ RUN set -x \
libdmalloc-dev \
libgif-dev \
libgirepository-1.0-1 \
libgirepository1.0-dev \
libglib2.0-dev \
libical-dev \
libjpeg-dev \
Expand Down
2 changes: 1 addition & 1 deletion integrations/docker/images/base/chip-build/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
57 : [Telink] Update Docker image (Zephyr update)
58 : Add libgirepository1.0-dev to the base image, to make build_python.sh work (assume we want this everywhere)
4 changes: 2 additions & 2 deletions scripts/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ if [ -n "$install_virtual_env" ]; then
if [ "$clean_virtual_env" = "yes" ]; then
# Create a virtual environment that has access to the built python tools
echo_blue "Creating a clear VirtualEnv in '$ENVIRONMENT_ROOT' ..."
virtualenv --clear "$ENVIRONMENT_ROOT"
python -m venv --clear "$ENVIRONMENT_ROOT"
elif [ ! -f "$ENVIRONMENT_ROOT"/bin/activate ]; then
echo_blue "Creating a new VirtualEnv in '$ENVIRONMENT_ROOT' ..."
virtualenv "$ENVIRONMENT_ROOT"
python -m venv "$ENVIRONMENT_ROOT"
fi

source "$ENVIRONMENT_ROOT"/bin/activate
Expand Down

0 comments on commit 1ae130f

Please sign in to comment.