From 9238c4d133d57d2c3d363fcf858baf108d96f5a7 Mon Sep 17 00:00:00 2001 From: guihkx <626206+guihkx@users.noreply.github.com> Date: Sat, 26 Jul 2025 15:38:52 -0300 Subject: [PATCH] linux/appimage: fix "pip install" commands Unfortunately, sourcing the Python venv Bash script to activate the virtual environment doesn't work while we're building the AppImage, so this just manually invokes Pip from within the venv to install updated versions of meson and ninja (for building PyGObject next), and then we prepend the venv's "bin" directory to the 'PATH' environment variable to make meson and ninja discoverable on the next "pip install" step. This also removes "certifi" from being manually installed, because "truststore" has been usable since commit 3897a8bccfba33d8e6c4be635fb3f348e0675852 ("ci/linux: build AppImage on Ubuntu 22.04 (Python 3.10)"). --- appimage/AppImageBuilder.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appimage/AppImageBuilder.yml b/appimage/AppImageBuilder.yml index 080b067..9434cbe 100644 --- a/appimage/AppImageBuilder.yml +++ b/appimage/AppImageBuilder.yml @@ -23,10 +23,10 @@ script: - cp "$SOURCE_DIR/pickaxe.png" "$TARGET_APPDIR/usr/share/icons/hicolor/128x128/apps/io.github.devilxd.twitchdropsminer.png" # Create a virtual environment and install up-to-date versions of meson and ninja. - - python3 -m venv env && source ./env/bin/activate && python3 -m pip install meson ninja + - python3 -m venv env && ./env/bin/python3 -m pip install meson ninja # Install requirements. - - python3 -m pip install --ignore-installed --prefix=/usr --root="$TARGET_APPDIR" -r "$SOURCE_DIR/../requirements.txt" certifi - # Generate byte-code files beforehand, for slightly faster app startup. + - PATH="$PWD/env/bin:$PATH" python3 -m pip install --prefix=/usr --root="$TARGET_APPDIR" -r "$SOURCE_DIR/../requirements.txt" + # Generate byte-code files and package them for a slightly faster app startup. - python3 -m compileall "$TARGET_APPDIR/usr/src/"*.py AppDir: