Development of v0.4.9.4 #36
Closed
git-developer
started this conversation in
General
Replies: 2 comments 25 replies
-
focal doesn't have the build deps in the repo, jammy fails on the following error and noble just works with this. Got it a bit further, but I don't have time at the moment to figure out why jammy refuses to use the wheel files atm. Maybe we can get away by installing docker build -o build-output --build-arg BASE_CODENAME=jammy . ARG BASE_OS=ubuntu
ARG BASE_CODENAME=noble
FROM $BASE_OS:$BASE_CODENAME AS build-stage
# Download build dependencies
RUN <<EOR
set -eu
apt-get update
apt-get install -y --no-install-recommends \
gcc \
librsvg2-bin \
linux-headers-generic \
python3-dev \
python3-setuptools \
python-is-python3 \
python3-build \
python3-venv \
python3-poetry \
python3-installer
apt-get clean && rm -rf /var/lib/apt/lists/*
EOR
# Prepare working directory and target
COPY . /work
WORKDIR /work
ARG TARGET=/build/usr
# Build and install
RUN <<EOR
set -eu
#pip install poetry
echo $(command -v python3)
python -m build --wheel
python -m installer --destdir="${TARGET}" dist/*.whl
# Provide input-event-codes.h as fallback for runtime systems without linux headers
cp -a \
"$(find /usr -type f -name input-event-codes.h -print -quit)" \
"$(find "${TARGET}" -type f -name uinput.py -printf '%h\n' -quit)"
# Create short name symlinks for static libraries
suffix=".cpython-*-$(uname -m)-linux-gnu.so"
find "${TARGET}" -type f -path "*/site-packages/*${suffix}" \
| while read -r path; do ln -sfr "${path}" "${path%${suffix}}.so"; done
# Put AppStream metadata to required location according to https://wiki.debian.org/AppStream/Guidelines
metainfo=/build/usr/share/metainfo
mkdir -p "${metainfo}"
cp -a scripts/sc-controller.appdata.xml "${metainfo}"
# Convert icon to png format (required for icons in .desktop file)
iconpath="${TARGET}/share/icons/hicolor/512x512/apps"
mkdir -p "${iconpath}"
rsvg-convert --background-color none -o "${iconpath}/sc-controller.png" images/sc-controller.svg
EOR
# Store build metadata
ARG TARGETOS TARGETARCH TARGETVARIANT
RUN export "TARGETMACHINE=$(uname -m)" && printenv | grep ^TARGET >>/build/.build-metadata.env
# Keep only files required for runtime
FROM scratch AS export-stage
COPY --from=build-stage /build / 2.887 removing build/bdist.linux-x86_64/wheel
2.943 * Creating virtualenv isolated environment...
2.943 * Installing packages in isolated environment... (setuptools>=60, wheel)
2.943 * Getting dependencies for wheel...
2.943 * Building wheel...
2.943 Successfully built sccontroller-0.4.9.3-cp310-cp310-linux_x86_64.whl
2.985 usage: python -m installer [-h] [--destdir path] [--compile-bytecode level]
2.985 [--no-compile-bytecode]
2.985 wheel
2.985 python -m installer: error: unrecognized arguments: dist/sccontroller-0.4.9.3-cp312-cp312-linux_x86_64.whl |
Beta Was this translation helpful? Give feedback.
25 replies
-
I tested v0.4.9.4, both daemon and GUI work great. I created issues for a few error messages that I found in the log. They didn't impact the user experience / program behavior. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The build of v0.4.9.3 failed. This might be related to the python version: it fails on bullseye, focal, jammy (python <3.11) and works on bookworm, trixie, noble (python >= 3.11). If you'd like to debug locally, you can run:
$ docker build -o build-output --build-arg BASE_CODENAME=focal .
The first failing commit is b3edd80.
Beta Was this translation helpful? Give feedback.
All reactions