File: snapcraft.yaml

package info (click to toggle)
python-certbot-dns-netcup 2.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 124 kB
  • sloc: python: 198; makefile: 3
file content (58 lines) | stat: -rw-r--r-- 1,537 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: certbot-dns-netcup
version: 2.0.0
summary: Certbot DNS Authenticator plugin for netcup
description: |
  This plugin automates the process of completing a dns-01 challenge by
  creating, and subsequently removing, TXT records using the netcup CCP
  API via lexicon.

confinement: strict
grade: stable
base: core24
platforms:
  all:
    build-on: amd64
    build-for: all


parts:
  certbot-dns-netcup:
    plugin: nil
    source: .
    build-packages:
      - python3-venv
    build-snaps:
      - certbot
    override-build: |
      MAJOR=$(python3 -c 'import sys; print(sys.version_info.major)')
      MINOR=$(python3 -c 'import sys; print(sys.version_info.minor)')
      SITE_PTH=lib/python$MAJOR.$MINOR/site-packages
      SITE_DIR=$SNAPCRAFT_PART_INSTALL/$SITE_PTH

      # Avoid installing packages that will already be included in the
      # certbot snap:
      mkdir -p $SITE_DIR
      echo /snap/certbot/current/$SITE_PTH > $SITE_DIR/certbot.pth

      python3 -m venv $SNAPCRAFT_PART_INSTALL

      VENV_BASE_PACKAGES=$(ls $SITE_DIR)

      $SNAPCRAFT_PART_INSTALL/bin/python -m pip install .

      cd $SITE_DIR
      # Remove our .pth file:
      rm -f certbot.pth
      # Remove presumably unneeded .so file - to keep platform independence:
      rm -f yaml/_yaml.*.so
      # Remove presumably unneeded packages of the venv base installation:
      rm -rf $VENV_BASE_PACKAGES
    prime:
      - lib

slots:
  certbot:
    interface: content
    content: certbot-1
    read:
      - $SNAP/lib/python3.12/site-packages