mirror of
https://github.com/hexbabe/python-appimage-module.git
synced 2026-01-04 19:31:13 +01:00
Add boilerplate derived from OAK-D module
This commit is contained in:
32
packaging/AppImageBuilder.yml
Normal file
32
packaging/AppImageBuilder.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
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 OAK-D 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
|
||||
21
packaging/Dockerfile
Executable file
21
packaging/Dockerfile
Executable file
@@ -0,0 +1,21 @@
|
||||
FROM python:3.10-bookworm
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y \
|
||||
build-essential \
|
||||
python3-pip \
|
||||
libgtk-3-bin \
|
||||
squashfs-tools \
|
||||
libglib2.0-bin \
|
||||
fakeroot
|
||||
|
||||
# Credit to perrito666 for the ubuntu fix
|
||||
RUN python3 -m pip install git+https://github.com/hexbabe/appimage-builder.git
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . /app
|
||||
|
||||
COPY packaging/. /app
|
||||
|
||||
CMD ["appimage-builder", "--recipe", "packaging/AppImageBuilder.yml"]
|
||||
BIN
packaging/viam-server.png
Normal file
BIN
packaging/viam-server.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
Reference in New Issue
Block a user