Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(snap): build all packages from source #2061

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading