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..5e87c1090 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}"