From a8e6753a008ca9af69e10178fa793a3078e11ca4 Mon Sep 17 00:00:00 2001 From: Erica Portnoy Date: Tue, 16 Jul 2024 18:03:32 -0700 Subject: [PATCH] add pythonpath like ubuntu does --- snap/snapcraft.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 589e4ab08..67178d3bb 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -18,6 +18,9 @@ base: core24 grade: stable adopt-info: certbot +environment: + PYTHONPATH: "$SNAP/lib/python3.12/site-packages:$SNAP/usr/lib/python3/dist-packages:$SNAP/usr/lib/python3.12:${PYTHONPATH}" + apps: certbot: command: bin/python3 -s $SNAP/bin/certbot @@ -98,8 +101,9 @@ parts: # dependencies. See https://github.com/certbot/certbot/pull/8443 for more info. - PIP_CONSTRAINT: $CRAFT_PART_SRC/snap-constraints.txt override-build: | - craftctl default + python3 -m venv "${CRAFT_PART_INSTALL}" "${CRAFT_PART_INSTALL}/bin/python3" "${CRAFT_PART_SRC}/tools/pipstrap.py" + craftctl default override-pull: | craftctl default grep -v python-augeas "${CRAFT_PART_SRC}/tools/requirements.txt" >> "${CRAFT_PART_SRC}/snap-constraints.txt"