From 49e8db9e221adb35d693906dc13f77b6a674ac34 Mon Sep 17 00:00:00 2001 From: guihkx <626206+guihkx@users.noreply.github.com> Date: Wed, 11 Sep 2024 05:28:09 -0300 Subject: [PATCH] linux/appimage: install meson and ninja from PyPI Some systems (e.g. Ubuntu 22.04, which we use to make the AppImage), have ancient versions of meson and ninja, which is not good when we have dependencies like PyGObject 3.47+ (and more recently, one of its transitive dependencies, pycairo 1.27+) requiring a fairly recent version of meson to be able to be built. So, instead of relying on whatever meson/ninja version the current system provides us with to make the AppImage, this change will simply install up-to-date, official wheels of meson/ninja directly from PyPI. This also allows us to finally unpin PyGObject's version. --- appimage/AppImageBuilder.yml | 2 ++ requirements.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/appimage/AppImageBuilder.yml b/appimage/AppImageBuilder.yml index 284f47bd..21bf1d63 100644 --- a/appimage/AppImageBuilder.yml +++ b/appimage/AppImageBuilder.yml @@ -22,6 +22,8 @@ script: - cp -r "$SOURCE_DIR/../lang" "$SOURCE_DIR/../icons" "$SOURCE_DIR"/../*.py "$TARGET_APPDIR/usr/src" - 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 # 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. diff --git a/requirements.txt b/requirements.txt index c743877a..4d0730e0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ aiohttp>=3.9,<4.0 Pillow pystray -PyGObject<3.47; sys_platform == "linux" # required for better system tray support on Linux +PyGObject; sys_platform == "linux" # required for better system tray support on Linux # environment-dependent dependencies pywin32; sys_platform == "win32"