Skip to content

Commit

Permalink
snapcraft: Install wheel instead of tarball
Browse files Browse the repository at this point in the history
  • Loading branch information
goldstar611 authored and kk7ds committed Jan 11, 2025
1 parent 837aef0 commit 33cb0a5
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,15 @@ parts:
sudo apt install -y curl
ver_with_next=$(basename $(curl -H "User-Agent: goldstar611" -Ls -o/dev/null -w '%{url_effective}' https://archive.chirpmyradio.com/download?stream=next))
ver_without_next=${ver_with_next//next-/}
curl -H "User-Agent: goldstar611" -o ${SNAPCRAFT_PART_SRC}/chirp-src.tar.gz https://archive.chirpmyradio.com/chirp_next/${ver_with_next}/chirp-${ver_without_next}.tar.gz
tar -xz -C ${SNAPCRAFT_PART_SRC} -f ${SNAPCRAFT_PART_SRC}/chirp-src.tar.gz --strip-components=1
curl -H "User-Agent: goldstar611" -o ${SNAPCRAFT_PART_SRC}/chirp.whl https://archive.chirpmyradio.com/chirp_next/${ver_with_next}/chirp-${ver_without_next}-py3-none-any.whl
pip install --no-input ${SNAPCRAFT_PART_SRC}/chirp.whl
# Fix icon
sed -i 's,Icon=chirp,Icon=${SNAP}/lib/python3.10/site-packages/chirp/share/chirp.svg,g' ${SNAPCRAFT_PART_SRC}/chirp/share/chirp.desktop
# snap version cannot be longer than 32 characters
TARBALL_SHA_SHORT=$(sha1sum ${SNAPCRAFT_PART_SRC}/chirp-src.tar.gz | head -c 8)
SNAP_VERSION="snap-$(date +%Y%m%d)+${TARBALL_SHA_SHORT}"
craftctl set version="$SNAP_VERSION"
stage-packages:
- python3-requests
- python3-serial
- python3-six
- python3-suds
- python3-future
- python3-yattag
- python3-wxgtk4.0
stage:
# WORKAROUND: Skip venv from python plugin
Expand Down

0 comments on commit 33cb0a5

Please sign in to comment.