Skip to content

Commit f572760

Browse files
authored
feat: create a non tag based snapcraft config
1 parent 0fe8b0c commit f572760

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

snap/test-snapcraft.yaml

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: tldr
2+
base: core24
3+
summary: tldr python client
4+
description: Python command-line client for tldr pages.
5+
6+
grade: stable
7+
confinement: strict
8+
9+
platforms:
10+
amd64:
11+
build-on: [amd64]
12+
build-for: [amd64]
13+
arm64:
14+
build-on: [arm64]
15+
build-for: [arm64]
16+
armhf:
17+
build-on: [armhf]
18+
build-for: [armhf]
19+
ppc64el:
20+
build-on: [ppc64el]
21+
build-for: [ppc64el]
22+
s390x:
23+
build-on: [s390x]
24+
build-for: [s390x]
25+
26+
parts:
27+
tldr:
28+
plugin: python
29+
source: https://github.com/tldr-pages/tldr-python-client.git
30+
source-type: git
31+
build-environment:
32+
- PATH: ${CRAFT_PART_INSTALL}/bin:${PATH}
33+
- PYTHONPATH: ${CRAFT_PART_INSTALL}/lib/python3.12/site-packages
34+
override-pull: |
35+
craftctl default
36+
sed -i "/data_files=\[('share\/man\/man1', \['docs\/man\/tldr\.1'\])\],/d" setup.py
37+
override-build: |
38+
craftctl default
39+
cd $CRAFT_PART_SRC/docs
40+
make man
41+
mkdir -p $CRAFT_PART_INSTALL/share/man/man1
42+
cp -r $CRAFT_PART_SRC/docs/man/tldr.1 $CRAFT_PART_INSTALL/share/man/man1/tldr.1
43+
python-packages:
44+
- Sphinx
45+
- sphinx-argparse
46+
prime:
47+
- -include
48+
- -bin/activate
49+
- -bin/activate.csh
50+
- -bin/activate.fish
51+
- -bin/Activate.ps1
52+
- -bin/python
53+
- -bin/python3
54+
- -bin/python3.12
55+
- -lib/*/*/sphinx*
56+
- -lib/*/*/setuptools*
57+
- -lib/*/*/pip*
58+
- -lib/*/*/pkg_resources
59+
- -bin/pip
60+
- -bin/pip3
61+
- -bin/pip3.12
62+
- -bin/[a-s, u-z, _]*
63+
- -pyvenv.cfg
64+
- -lib/*/*/[a-b, d-r, u-z, A-B, D-R, U-Z, _]*
65+
- -lib/*/*/certifi*
66+
- -lib/*/*/charset*
67+
- -lib/*/*/snowballs*
68+
69+
apps:
70+
tldr:
71+
command: bin/tldr
72+
environment:
73+
PYTHONPATH: $SNAP/lib/python3.12/site-packages:$PYTHONPATH
74+
plugs:
75+
- network
76+
- home

0 commit comments

Comments
 (0)