-
-
Notifications
You must be signed in to change notification settings - Fork 95
/
snapcraft.yaml
77 lines (73 loc) · 1.81 KB
/
snapcraft.yaml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: tldr
base: core24
version: '3.3.0'
summary: tldr python client
description: Python command-line client for tldr pages.
grade: stable
confinement: strict
platforms:
amd64:
build-on: [amd64]
build-for: [amd64]
arm64:
build-on: [arm64]
build-for: [arm64]
armhf:
build-on: [armhf]
build-for: [armhf]
ppc64el:
build-on: [ppc64el]
build-for: [ppc64el]
s390x:
build-on: [s390x]
build-for: [s390x]
parts:
tldr:
plugin: python
source: https://github.com/tldr-pages/tldr-python-client.git
source-tag: $SNAPCRAFT_PROJECT_VERSION
build-environment:
- PATH: ${CRAFT_PART_INSTALL}/bin:${PATH}
- PYTHONPATH: ${CRAFT_PART_INSTALL}/lib/python3.12/site-packages
override-pull: |
craftctl default
sed -i "/data_files=\[('share\/man\/man1', \['docs\/man\/tldr\.1'\])\],/d" setup.py
override-build: |
craftctl default
cd $CRAFT_PART_SRC/docs
make man
mkdir -p $CRAFT_PART_INSTALL/share/man/man1
cp -r $CRAFT_PART_SRC/docs/man/tldr.1 $CRAFT_PART_INSTALL/share/man/man1/tldr.1
python-packages:
- Sphinx
- sphinx-argparse
prime:
- -include
- -bin/activate
- -bin/activate.csh
- -bin/activate.fish
- -bin/Activate.ps1
- -bin/python
- -bin/python3
- -bin/python3.12
- -lib/*/*/sphinx*
- -lib/*/*/setuptools*
- -lib/*/*/pip*
- -lib/*/*/pkg_resources
- -bin/pip
- -bin/pip3
- -bin/pip3.12
- -bin/[a-s, u-z, _]*
- -pyvenv.cfg
- -lib/*/*/[a-b, d-r, u-z, A-B, D-R, U-Z, _]*
- -lib/*/*/certifi*
- -lib/*/*/charset*
- -lib/*/*/snowballs*
apps:
tldr:
command: bin/tldr
environment:
PYTHONPATH: $SNAP/lib/python3.12/site-packages:$PYTHONPATH
plugs:
- network
- home