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

layers/meta-opentrons: fix jupyter install in kirkstone #127

Merged
merged 12 commits into from
Jan 31, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From 671e0d091b40ef7deb4a9d43e0dbed2a44edbec8 Mon Sep 17 00:00:00 2001
From: Matthew Fernandez <matthew.fernandez@gmail.com>
Date: Sat, 9 Sep 2023 01:03:04 -0700
Subject: [PATCH] Autotools: fix: do not put '$prefix' based paths in
compilation flags

This was causing problems with cross-compilation with a dedicated sysroot,
because compilation would incorrectly use headers and libraries from the
`--prefix` path. The `--prefix` path is meant to indicate a target path to
install to, not a path from which to source dependent libraries.

Gitlab: fixes #2442
Reported-by: Daniel Klauer
Suggested-by: Daniel Klauer

Upstream-Status: Backport [https://gitlab.com/graphviz/graphviz/-/commit/012d250a903e13114bce3ba40995fb957fed7848]
Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
---
configure.ac | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index 573a3ee5d..7d53346de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -190,14 +190,6 @@ if test "x${prefix}" = "xNONE"; then
AC_SUBST([prefix])
fi

-# automatically check for other dependencies in $prefix first
-if test "x${prefix}" != "x/usr"; then
- CPPFLAGS="$CPPFLAGS -I${prefix}/include"
- LDFLAGS="$LDFLAGS -L${prefix}/lib"
- PKG_CONFIG_PATH="$prefix/lib/pkgconfig$PATHSEPARATOR$PKG_CONFIG_PATH"
- export PKG_CONFIG_PATH
-fi
-
dnl -----------------------------------
# Static/Shared binaries

--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# apply https://github.com/openembedded/meta-openembedded/commit/883860c40c67544dfe3e2d72732e2d8ef46b6f30 which
# is in nanbield only
FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI:append := " \
file://0001-Autotools-fix-do-not-put-prefix-based-paths-in-compi.patch \
"


# apply https://github.com/openembedded/meta-openembedded/commit/fa616dca0a910aa75565de4988bc7a83102ed17a which
# is in mickledore only

EXTRA_OECONF:class-native := "\
--disable-tcl \
"

Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ IMAGE_INSTALL += " \
weston-xwayland weston weston-init imx-gpu-viv \
robot-app-wayland-launch opentrons-robot-app \
opentrons-robot-server opentrons-update-server \
opentrons-jupyter-notebook opentrons-usb-bridge \
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 python3-misc python3-modules \
python3-pip \
plymouth \
mosquitto \
opentrons-jupyter-notebook \
"

# 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 @@ -5,15 +5,15 @@ Description=Jupyter notebook server
Type=simple
Restart=always
RestartSec=1
ExecStart=/bin/sh -c "jupyter notebook --allow-root --config=%E/jupyter/jupyter_notebook_config.py --notebook-dir=%S/jupyter/notebooks 2>&1"
ExecStart=/usr/bin/jupyter notebook --allow-root --config=%E/jupyter/jupyter_notebook_config.py --notebook-dir=%S/jupyter/notebooks
PIDFile=%t/jupyter/jupyter.pid
SupplementaryGroups=dialout
StateDirectory=jupyter jupyter/notebooks jupyter/data jupyter/config ipython
RuntimeDirectory=jupyter
Environment=RUNNING_ON_VERDIN=true
Environment=OT_SYSTEM_VERSION=##OT_SYSTEM_VERSION##
Environment=OT_API_FF_enableOT3HardwareController=true
Environment=PYTHONPATH=/opt/opentrons-robot-server:/usr/lib/python3.10/site-packages
Environment=PYTHONPATH=/opt/opentrons-robot-server/:/usr/lib/python3.10/site-packages/:/var/user-packages/usr/lib/python3.10/site-packages/
Environment=JUPYTER_RUNTIME_DIR=%t/jupyter
Environment=JUPYTER_CONFIG_DIR=%S/jupyter/config
Environment=JUPYTER_DATA_DIR=%S/jupyter/data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ SRC_URI += "file://jupyter_notebook_config.py \

do_install:append() {
install -d ${D}/${sysconfdir}/jupyter
install -d ${D}/${sysconfdir}/systemd/system
install -m 644 ${WORKDIR}/jupyter_notebook_config.py ${D}/${sysconfdir}/jupyter/jupyter_notebook_config.py
install -m 644 ${WORKDIR}/jupyter-notebook.service ${D}/${sysconfdir}/systemd/system/jupyter-notebook.service

# set the system version env variable
sed -i 's/##OT_SYSTEM_VERSION##/${OT_SYSTEM_VERSION}/' ${D}/${sysconfdir}/systemd/system/jupyter-notebook.service
install -d ${D}${systemd_system_unitdir}
install -m 644 ${WORKDIR}/jupyter-notebook.service ${D}${systemd_system_unitdir}/jupyter-notebook.service
# set the system version env variable
sed -i 's/##OT_SYSTEM_VERSION##/${OT_SYSTEM_VERSION}/' ${D}/${systemd_system_unitdir}/jupyter-notebook.service
}

FILES:${PN} += "${sysconfdir}/jupyter/jupyter_notebook_config.py \
${sysconfdir}/systemd/system/jupyter-notebook.service \
"

RDEPENDS:${PN} += "python3-jupyter"
RDEPENDS:${PN} += " python3-jupyter python3-nbclient python3-jupyterlab-pygments python3-psutil python3-nest-asyncio "
Loading