Issue while packaging snap

Hey @ogra please help

sorry, i have no idea why the python3 interpreter is not found … it might help others to help you if you share your snapcraft.yaml in its current state…

name: frog # you probably want to 'snapcraft register <name>'
base: core22 # the base snap is the execution environment for this snap
version: '1.2.0' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: |
  This is my-snap's description. You have a paragraph or two to tell the
  most important story about your snap. Keep it under 100 words though,
  we live in tweetspace and your description wants to look good in the snap
  store.

grade: devel # must be 'stable' to release into candidate/stable channels
confinement: devmode # use 'strict' once you have the right plugs and slots

  
parts:
  frog:
    plugin: meson
    source-type: git
    source: https://github.com/TenderOwl/Frog.git
    source-tag: "1.2.0"
    meson-parameters:
      - --prefix=/usr
      - --buildtype=release
    # See 'snapcraft plugins'
    build-packages:
      - meson
      - ninja-build
      - python3
      - python3-gi 
      - gettext
      - pkg-config
      - libglib2.0-dev
      - desktop-file-utils
      - appstream
      - libappstream-dev 
    stage-packages:
      - python-is-python3
      - python3
      - python3-pyzbar
      - python3-pydbus 
      - python3-tesserocr 
      - tesseract-ocr 
    override-pull: |
      craftctl default
    # WORKAROUND: Point icon directly to SVG otherwise snapcraft can't find it
      sed -e 's|Icon=com.github.tenderowl.frog|Icon=/usr/share/icons/hicolor/scalable/apps/com.github.tenderowl.frog.svg|' -i data/com.github.tenderowl.frog.desktop.in
      
slots:
  frog:
    interface: dbus
    bus: session
    name: com.github.tenderowl.frog
plugs:
  pictures:
    interface: personal-files
    write:
      - $HOME/Pictures
apps:
  frog:
    command: usr/bin/frog
    common-id: com.github.tenderowl.frog
    extensions: [gnome]
    #desktop: usr/share/applications/com.github.tenderowl.frog.desktop
    environment:
      # WORKAROUND: Add python modules in Snap to search path
      PYTHONPATH: ${SNAP}/lib/python3.10/site-packages:${SNAP}/usr/lib/python3/dist-packages
      XDG_DATA_HOME: $SNAP_USER_DATA/.local/share 
    plugs:
      - home
      - pictures

Everyone else facing this issue, add this in your script.

override-build: |
      craftctl default
      # WORKAROUND: Use python from search path, the path detected by meson doesn't exist when running the Snap
      sed -e '1c#!/usr/bin/env python3' -i "${CRAFT_PART_INSTALL}/usr/bin/<snap_name>"
1 Like

post withdrawn by author.

The tdchad file is probably not in the /usr/bin directory, may be somewhere else. Check the zip may be? Where that file is getting installed. You can shell into the builder if you run using snapcraft --verbosity debug --debug