Skip to content

Commit e45af51

Browse files
committed
backend: Simplify dependencies
1 parent 79256e4 commit e45af51

2 files changed

Lines changed: 9 additions & 12 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
894a816
1+
45b6c5e

software/distro/setup/planktoscope-app-env/python-hardware-controller/install.sh

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ esac
2121
sudo -E apt-get install -y -o Dpkg::Progress-Fancy=0 \
2222
git python3-pip python3-venv
2323

24-
## Upgrade python3-libcamera to solve an issue in Raspberry Pi OS bookworm-2024-11-19
25-
## https://github.com/raspberrypi/picamera2/issues/1229#issuecomment-2772493538
26-
sudo -E apt-get install -y -o Dpkg::Progress-Fancy=0 --only-upgrade \
27-
python3-libcamera
28-
2924
# Suppress keyring dialogs when setting up the PlanktoScope distro on a graphical desktop
3025
# (see https://github.com/pypa/pip/issues/7883)
3126
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
@@ -42,7 +37,7 @@ python3 -m venv "$POETRY_VENV"
4237
"$POETRY_VENV/bin/pip" install --upgrade --progress-bar off \
4338
pip==23.3.2 setuptools==68.2.2
4439
"$POETRY_VENV/bin/pip" install --progress-bar off cryptography==41.0.5
45-
"$POETRY_VENV/bin/pip" install --progress-bar off poetry==1.7.1
40+
"$POETRY_VENV/bin/pip" install --progress-bar off poetry==2.1.2
4641

4742
# Download device-backend monorepo
4843
backend_repo="$(cat "$config_files_root/backend-repo")"
@@ -51,13 +46,15 @@ git clone "https://$backend_repo" "$HOME/device-backend" --no-checkout --filter=
5146
git -C "$HOME/device-backend" checkout --quiet "$backend_version"
5247

5348
# Set up the hardware controllers
54-
# Note(ethanjli): we use picamera2 from the system for compatibility, and because dependencies are
55-
# annoying to manage on armv7. Once we migrate to RPi OS 12 (bookworm), let's try again to just
56-
# install it via poetry.
49+
# Upgrade python3-libcamera to solve an issue in Raspberry Pi OS bookworm-2024-11-19
50+
# https://github.com/raspberrypi/picamera2/issues/1229#issuecomment-2772493538
51+
# Once this fails in CI, it means the default version of python3-libcamera in
52+
# Raspberry Pi OS has been updated. In which case this can be removed.
53+
echo "If the next command fails, see comment in install.sh"
54+
sudo -E apt-get install -y -o Dpkg::Progress-Fancy=0 --only-upgrade \
55+
python3-libcamera=0.4.0+rpt20250213-1
5756
sudo -E apt-get install -y --no-install-recommends -o Dpkg::Progress-Fancy=0 \
5857
i2c-tools libopenjp2-7 python3-picamera2
59-
"$POETRY_VENV/bin/poetry" --directory "$HOME/device-backend/control" config \
60-
virtualenvs.options.system-site-packages true --local
6158
"$POETRY_VENV/bin/poetry" --directory "$HOME/device-backend/control" install \
6259
--no-root --compile
6360
file="/etc/systemd/system/planktoscope-org.device-backend.controller-adafruithat.service"

0 commit comments

Comments
 (0)