From 6e5fee7103cb2635bf25c8a55318ab0bc5ae6a33 Mon Sep 17 00:00:00 2001 From: guihkx <626206+guihkx@users.noreply.github.com> Date: Mon, 22 Jan 2024 17:51:50 -0300 Subject: [PATCH] linux/appimage: generate byte-code files and package them This makes the app start slightly faster, as byte-code files won't need to be generated every time users run the app. https://docs.python.org/3.10/library/compileall.html --- appimage/AppImageBuilder.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/appimage/AppImageBuilder.yml b/appimage/AppImageBuilder.yml index 2013275..3763a30 100644 --- a/appimage/AppImageBuilder.yml +++ b/appimage/AppImageBuilder.yml @@ -24,6 +24,8 @@ script: # 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. + - python3 -m compileall "$TARGET_APPDIR/usr/src/"*.py AppDir: app_info: