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
3897a8bccf ("ci/linux: build AppImage on
Ubuntu 22.04 (Python 3.10)").
This commit is contained in:
guihkx
2025-07-26 15:38:52 -03:00
committed by DevilXD
parent 1fa20d3634
commit 9238c4d133

View File

@@ -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: