I need some feedback for making the snap of this cross-platform pyqt app I am developing GitHub - archisman-panigrahi/QuickBib: Get BibTeX from a DOI — fast.
Here is my current snapcraft.yaml — the problems are following
- While it builds on my computer (which I used to publish a snap (for amd64 only)), it fails on GitHub Actions due to missing python3.12 (Build & Publish Snap · archisman-panigrahi/QuickBib@44ac867 · GitHub).
- The snap looks out of place in my Kubuntu 24.04 setup – it doesn’t follow the system theme, and also, when the pointer goes over it, it falls back to a different looking pointer theme (the corresponding flatpak doesn’t have this issue, therefore I believe that a better integration would be possible with snap).
name: quickbib
version: '0.3.2'
summary: "Get BibTeX from a DOI — fast"
description: |
QuickBib is a small cross-platform desktop app that retrieves the BibTeX
entry for a publication from its DOI (Digital Object Identifier). It
supports DOIs, arXiv IDs and many journal URLs and uses the doi2bib3 library
as its backend to fetch and format BibTeX entries.
title: QuickBib
contact: https://github.com/archisman-panigrahi/QuickBib
license: GPL-3.0-only
website: https://archisman-panigrahi.github.io/QuickBib/
source-code: https://github.com/archisman-panigrahi/QuickBib
issues: https://github.com/archisman-panigrahi/QuickBib/issues
grade: stable
confinement: strict
base: core24
compression: lzo
apps:
quickbib:
command: usr/bin/quickbib
environment:
PYTHONPATH: $SNAP/usr/lib/python3/site-packages:$SNAP/usr/lib/python3/dist-packages:$PYTHONPATH
QT_PLUGIN_PATH: ${SNAP}/usr/lib/x86_64-linux-gnu/qt6/plugins
QT_QPA_PLATFORM_PLUGIN_PATH: ${SNAP}/usr/lib/x86_64-linux-gnu/qt6/plugins/platforms
# XDG_DATA_DIRS: $SNAP/usr/share:${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}
plugs:
- network
- x11
- wayland
parts:
quickbib:
plugin: meson
source: ..
build-packages:
- python3-dev
- pkg-config
- build-essential
- meson
- ninja-build
stage-packages:
- python3
- python3-pyqt6
# Debug helper: ensure meson.build is at the top of the part source.
# Some managed build setups copy the repository under a 'project' subdir
# inside $SNAPCRAFT_PART_SRC; if so, move files up so Meson sees
# meson.build at $SNAPCRAFT_PART_SRC.
override-pull: |
# run the default pull step
snapcraftctl pull
echo "---- listing part src after pull (before fix) ----"
ls -la "$SNAPCRAFT_PART_SRC" || true
if [ -d "$SNAPCRAFT_PART_SRC/project" ]; then
echo "Found nested project directory; moving contents up..."
sh -c 'cp -a "$SNAPCRAFT_PART_SRC/project/." "$SNAPCRAFT_PART_SRC"'
rm -rf "$SNAPCRAFT_PART_SRC/project"
fi
echo "---- listing part src after fix ----"
ls -la "$SNAPCRAFT_PART_SRC" || true
override-build: |
# run the default build step (meson + ninja)
snapcraftctl build
echo "---- moving /usr/local -> /usr in part install (if present) ----"
if [ -d "$SNAPCRAFT_PART_INSTALL/usr/local/bin" ]; then
mkdir -p "$SNAPCRAFT_PART_INSTALL/usr/bin"
cp -a "$SNAPCRAFT_PART_INSTALL/usr/local/bin/." "$SNAPCRAFT_PART_INSTALL/usr/bin/" || true
fi
if [ -d "$SNAPCRAFT_PART_INSTALL/usr/local/share" ]; then
mkdir -p "$SNAPCRAFT_PART_INSTALL/usr/share"
cp -a "$SNAPCRAFT_PART_INSTALL/usr/local/share/." "$SNAPCRAFT_PART_INSTALL/usr/share/" || true
fi
python-deps:
plugin: python
source: ..
python-packages:
- doi2bib3
stage-packages:
- python3
lint:
ignore:
- classic
- library:
- usr/lib/**/lib*.so*
- metadata:
- donation