Skip to content

Commit

Permalink
opentrons-ot3-image: Add python3 pip module so users can install pyth…
Browse files Browse the repository at this point in the history
…on packages. (#104)
  • Loading branch information
vegano1 authored Sep 18, 2023
1 parent 2bd095d commit 315ef11
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[install]
root = /var/user-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Add the path to the rw package directory in /var
/var/user-packages/usr/lib/python3.8/site-packages/
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

SRC_URI_append += "\
file://pip.conf \
file://user-packages.pth \
"

do_install_append() {
# install pip config file to set the package install dir to a read/write part of the rootfs
install -d ${D}/${sysconfdir}
install -m 644 ${WORKDIR}/pip.conf ${D}/${sysconfdir}/pip.conf

# install pth file so python knows where to find user installed packages
install -d ${D}/${libdir}
install -m 644 ${WORKDIR}/user-packages.pth ${D}/${libdir}/python3.8/site-packages/
}

FILES_${PN} += "\
${sysconfdir}/pip.conf \
${libdir}/user-packages.pth \
"
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ IMAGE_INSTALL += " \
weston-xwayland weston weston-init imx-gpu-viv \
robot-app-wayland-launch opentrons-robot-app \
opentrons-robot-server opentrons-update-server \
python3 python3-misc python3-modules python3-jupyter \
opentrons-jupyter-notebook opentrons-usb-bridge \
opentrons-system-server opentrons-mcu-firmware \
opentrons-user-environment opentrons-module-firmware \
opentrons-systemd-units opentrons-ssh-keys \
python3 python3-misc python3-modules python3-jupyter \
python3-pip \
"

# We do NOT want the toradex libusbgx packages that autoconfigure the OTG USB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
export RUNNING_ON_VERDIN=1
export OT_API_FF_enableOT3HardwareController="true"
export PYTHONPATH=$PYTHONPATH:/opt/opentrons-robot-server
export PATH=$PATH:/var/user-packages/usr/bin

0 comments on commit 315ef11

Please sign in to comment.