Skip to content

Commit

Permalink
snap: enable building using current remote-build
Browse files Browse the repository at this point in the history
As sources are re-packed, references are broken.

Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
  • Loading branch information
sergiusens committed Aug 7, 2023
1 parent 8af2d99 commit d22913b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PYTHON_PACKAGE_PATH="${SNAPCRAFT_PART_INSTALL}/usr/lib/python3.8/"

# Apply patches
echo "Patching ctypes..."
patch -s -b "${PYTHON_PACKAGE_PATH}/ctypes/__init__.py" "${SNAPCRAFT_PROJECT_DIR}/patches/ctypes_init.diff"
patch -s -b "${PYTHON_PACKAGE_PATH}/ctypes/__init__.py" "${SNAPCRAFT_PROJECT_DIR}/snap/local/patches/python/ctypes_init.diff"

# Save patches to allow rebuilding
mkdir -p patched/ctypes
Expand Down
4 changes: 3 additions & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ parts:
# Remove so the link can be recreated on re-builds
rm -f "$TRIPLET_PATH/libsodium.so"
ln -s "$LIBSODIUM" "$TRIPLET_PATH/libsodium.so"
$SNAPCRAFT_PROJECT_DIR/tools/snapcraft-override-build.sh
$SNAPCRAFT_PROJECT_DIR/snap/local/scripts/snapcraft-override-build.sh
snapcraft:
source: .
Expand All @@ -128,6 +128,8 @@ parts:
- setuptools<66 # Limited to < 66 because we need `pkg_resources` and because `python-apt` doesn't build with the latest.
requirements:
- requirements.txt
constraints:
- constraints.txt
organize:
# Put snapcraftctl into its own directory that can be included in the PATH
# without including other binaries.
Expand Down

0 comments on commit d22913b

Please sign in to comment.