From b698c55a3bdc8b9513795c5ab9f9cf068f4f6dca Mon Sep 17 00:00:00 2001 From: Sergio Schvezov Date: Mon, 7 Aug 2023 11:33:01 -0300 Subject: [PATCH 1/2] packaging: fix build for armhf, ppc64el and riscv64 Move to PyYaml 6.0.1 and constrain to cython < 0 to avoid yaml/pyyaml#601 Signed-off-by: Sergio Schvezov --- constraints.txt | 1 + requirements.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 constraints.txt diff --git a/constraints.txt b/constraints.txt new file mode 100644 index 0000000000..039eb0db27 --- /dev/null +++ b/constraints.txt @@ -0,0 +1 @@ +cython<3 diff --git a/requirements.txt b/requirements.txt index df623a57b2..5231f45b01 100644 --- a/requirements.txt +++ b/requirements.txt @@ -51,7 +51,7 @@ python-dateutil==2.8.2 python-debian==0.1.49 pytz==2023.3 pyxdg==0.28 -PyYAML==6.0 +PyYAML==6.0.1 raven==6.10.0 requests==2.30.0 requests-toolbelt==1.0.0 From 24808385d9e08a60f830de59a844610a085eb170 Mon Sep 17 00:00:00 2001 From: Sergio Schvezov Date: Mon, 7 Aug 2023 11:34:36 -0300 Subject: [PATCH 2/2] snap: enable building using current remote-build As sources are re-packed, references are broken. Signed-off-by: Sergio Schvezov --- {patches => snap/local/patches/python}/ctypes_init.diff | 0 {tools => snap/local/scripts}/snapcraft-override-build.sh | 2 +- snap/snapcraft.yaml | 4 +++- 3 files changed, 4 insertions(+), 2 deletions(-) rename {patches => snap/local/patches/python}/ctypes_init.diff (100%) rename {tools => snap/local/scripts}/snapcraft-override-build.sh (91%) diff --git a/patches/ctypes_init.diff b/snap/local/patches/python/ctypes_init.diff similarity index 100% rename from patches/ctypes_init.diff rename to snap/local/patches/python/ctypes_init.diff diff --git a/tools/snapcraft-override-build.sh b/snap/local/scripts/snapcraft-override-build.sh similarity index 91% rename from tools/snapcraft-override-build.sh rename to snap/local/scripts/snapcraft-override-build.sh index 1ca7f7cc83..2799e98e23 100755 --- a/tools/snapcraft-override-build.sh +++ b/snap/local/scripts/snapcraft-override-build.sh @@ -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 diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 4422c6607d..b2dc21065c 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -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: . @@ -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.