Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions meta-opencentauri/images/opencentauri-image-base.bb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ inherit core-image

IMAGE_FEATURES += "ssh-server-dropbear"

BAD_RECOMMENDATIONS += "python3-unittest"

CORE_IMAGE_EXTRA_INSTALL += "\
usbutils \
libgpiod \
Expand Down
3 changes: 3 additions & 0 deletions meta-opencentauri/recipes-apps/klipper/files/klipper-init-d
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ KLIPPY_EXEC="/usr/bin/python3"
KLIPPY_ARGS="/usr/share/klipper/klippy/klippy.py /etc/klipper/config/printer.cfg -l /board-resource/klippy.log -a /run/klippy.sock"
PIDFILE="/var/run/klipper.pid"

export PYTHONDONTWRITEBYTECODE=1
export PYTHONNOUSERSITE=1

case "$1" in
start)
echo "Starting klipper..."
Expand Down
9 changes: 5 additions & 4 deletions meta-opencentauri/recipes-apps/klipper/kalico_2026.02.00.bb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SRC_URI += " \
file://misc.cfg \
"

inherit python3-dir update-rc.d
inherit python3-dir python3native update-rc.d

RDEPENDS:${PN} = " \
python3 \
Expand Down Expand Up @@ -72,9 +72,10 @@ do_install() {
install -d ${D}${datadir}/klipper
cp -r ${S}/klippy ${D}${datadir}/klipper/

# Remove any .pyc files to avoid TMPDIR references
find ${D} -name '*.pyc' -delete
find ${D} -name '__pycache__' -type d -exec rm -rf {} + 2>/dev/null || true
# Precompile optimized bytecode in place. Keep .py sources for Kalico:
# klippy/compat.py checks for on-disk .py files when resolving legacy imports.
nativepython3 -OO -m compileall -b -f ${D}${datadir}/klipper/klippy
find ${D}${datadir}/klipper -name '__pycache__' -type d -exec rm -rf {} + 2>/dev/null || true

# Install default kalico config
install -d ${D}${sysconfdir}/klipper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ PIDFILE="/var/run/moonraker.pid"

export PYTHONPATH="/usr/share/moonraker"
export TMPDIR="/user-resource/.tmp"
export PYTHONDONTWRITEBYTECODE=1
export PYTHONNOUSERSITE=1

case "$1" in
start)
Expand Down
10 changes: 9 additions & 1 deletion meta-opencentauri/recipes-apps/moonraker/moonraker_0.10.0.bb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ S = "${WORKDIR}/git"

PR = "r1"

inherit python3-dir update-rc.d
inherit python3-dir python3native update-rc.d

DEPENDS = " \
python3-native \
Expand Down Expand Up @@ -66,6 +66,14 @@ do_install() {
install -d ${D}${datadir}/moonraker
cp -r ${S}/moonraker ${D}${datadir}/moonraker/

# Precompile optimized bytecode in place. Keep metadata.py because
# Moonraker launches it directly for gcode metadata extraction.
nativepython3 -OO -m compileall -b -f ${D}${datadir}/moonraker/moonraker
find ${D}${datadir}/moonraker/moonraker -name '*.py' \
! -path "${D}${datadir}/moonraker/moonraker/components/file_manager/metadata.py" \
-delete
find ${D}${datadir}/moonraker -name '__pycache__' -type d -exec rm -rf {} + 2>/dev/null || true

# Install default moonraker config
install -d ${D}${sysconfdir}/klipper
install -d ${D}${sysconfdir}/klipper/config
Expand Down
10 changes: 10 additions & 0 deletions meta-opencentauri/recipes-devtools/python/python3_%.bbappend
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
PACKAGECONFIG:remove:class-target = "gdbm tk tcl readline"
PACKAGECONFIG:append:class-target = " lto pgo"

BAD_RECOMMENDATIONS += " \
python3-tkinter \
python3-idle \
python3-pydoc \
python3-doctest \
python3-2to3 \
python3-dev \
"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RDEPENDS:${PN}:remove = "python3-unittest"
Loading