add pythonpath like ubuntu does

This commit is contained in:
Erica Portnoy 2024-07-16 18:03:32 -07:00
parent bdd392d5b1
commit a8e6753a00

View file

@ -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"