mirror of
https://github.com/hexbabe/python-appimage-module.git
synced 2025-07-20 20:42:05 +02:00
33 lines
1.5 KiB
YAML
33 lines
1.5 KiB
YAML
version: 1
|
|
script:
|
|
- python3 -m pip install -r requirements.txt # install dependency packages as modules in root (modules in this context means Python modules)
|
|
- mkdir -p AppDir/usr/lib/python3.10 && cp -r /usr/local/lib/python3.10/site-packages AppDir/usr/lib/python3.10 # cp from root into appdir; site-packages contains all our modules including dependencies
|
|
- cp -r src AppDir/usr/lib/python3.10/site-packages # add source code dir to site-packages so the module can be discovered in PYTHONPATH and be run as a Python module
|
|
- mkdir -p AppDir/usr/share/icons/hicolor/256x256/apps/ && cp viam-server.png AppDir/usr/share/icons/hicolor/256x256/apps/ # icon is required
|
|
|
|
AppDir:
|
|
path: ./AppDir
|
|
app_info:
|
|
id: com.example-org.python-appimage-example # replace with your own id and name
|
|
name: python-appimage-example # affects the outputted .AppImage name
|
|
version: "" # affects the outputted .AppImage name
|
|
icon: viam-server
|
|
exec: usr/bin/python3
|
|
exec_args: "-m src.main $@"
|
|
apt:
|
|
arch: arm64
|
|
allow_unauthenticated: true
|
|
sources:
|
|
- sourceline: 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse'
|
|
include:
|
|
- python3.10
|
|
- python3-pkg-resources # necessary for package metadata and paths
|
|
|
|
runtime:
|
|
env:
|
|
PYTHONHOME: '${APPDIR}/usr' # https://docs.python.org/3/using/cmdline.html#environment-variables
|
|
PYTHONPATH: '${APPDIR}/usr/lib/python3.10/site-packages'
|
|
|
|
AppImage:
|
|
arch: aarch64 # affects the outputted .AppImage name
|