From c193cf77fc8e6f0a362b910d68b8e14cb7996ec3 Mon Sep 17 00:00:00 2001 From: Alex Lowe Date: Fri, 20 Dec 2024 13:51:11 -0500 Subject: [PATCH] fix(snap): build all packages from source --- requirements-jammy.txt | 2 +- snap/snapcraft.yaml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/requirements-jammy.txt b/requirements-jammy.txt index 6f5010229..3db7f0419 100644 --- a/requirements-jammy.txt +++ b/requirements-jammy.txt @@ -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" diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 6d16e04f0..7c1aa3f95 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -149,7 +149,9 @@ 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 @@ -157,7 +159,7 @@ parts: 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}"