This project contains an appimage-builder recipe for a Python3 application. To recreate the package use a modern Debian/Ubuntu system and appimage-builder.
Packaging a Python3 application into an AppImage is quite similar to packaging a regular compiled application. Just a few adjustments are required:
-
Use the Python main binary as entry point:
exec: usr/bin/python3
-
Install the pip requirements using the AppDir as root:
python3 -m pip install --root=AppDir -r ./requirements.txt
-
Set the PYTHONHOME environment variable in the AppImage runtime:
PYTHONHOME: '${APPDIR}/usr'
-
Copy your app source code into the AppDir:
cp ./src AppDir/usr -r
That's all!
Check the appimage-builder.yml file for the complete recipe.