Skip to content

Commit

Permalink
fix(snap): build all packages from source
Browse files Browse the repository at this point in the history
  • Loading branch information
lengau committed Dec 20, 2024
1 parent c952210 commit c193cf7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements-jammy.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-apt @ https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.4.0ubuntu3/python-apt_2.4.0ubuntu3.tar.xz ; sys_platform == "linux"
python-apt @ https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/python-apt/2.4.0ubuntu4/python-apt_2.4.0ubuntu4.tar.xz ; sys_platform == "linux"
6 changes: 4 additions & 2 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,17 @@ parts:
rustup default 1.79
override-build: |
uv venv --relocatable $CRAFT_PART_INSTALL
uv sync --no-dev --no-editable --extra apt-jammy
uv sync --no-dev --no-editable --no-binary
. $CRAFT_PART_INSTALL/bin/activate
uv pip install -r requirements-jammy.txt
rm $CRAFT_PART_INSTALL/lib64
cp -v completion.bash $CRAFT_PART_INSTALL
mkdir -p $CRAFT_PART_INSTALL/libexec/charmcraft
sed -i 's|#!/bin/sh|#!/snap/charmcraft/current/bin/python3|' $CRAFT_PART_INSTALL/bin/craftctl
version="$($CRAFT_PART_INSTALL/bin/charmcraft --version | cut -d' ' -f2)"
version="$(uv pip show charmcraft|grep "Version:" | cut -d' ' -f2)"
/snap/snapcraft/current/libexec/snapcraft/craftctl set version="${version}"
[ -n "$(echo $version | grep "post")" ] && grade=devel || grade=stable
/snap/snapcraft/current/libexec/snapcraft/craftctl set grade="${grade}"
Expand Down

0 comments on commit c193cf7

Please sign in to comment.