-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathsnapcraft.yaml
More file actions
85 lines (85 loc) · 2.86 KB
/
snapcraft.yaml
File metadata and controls
85 lines (85 loc) · 2.86 KB
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
78
79
80
81
82
83
84
85
name: charm
adopt-info: charm-tools
summary: charm and charm-tools
description: charmstore-client and charm-tools
confinement: classic
grade: stable
base: core18
apps:
charm:
command: bin/wrappers/charm
parts:
charmstore-client:
after:
- bhttp
build-attributes: ['no-patchelf']
source: https://github.com/juju/charmstore-client.git
source-branch: master
source-type: git
plugin: go
go-importpath: github.com/juju/charmstore-client
build-packages:
- bzr
- python3-pip
stage-snaps:
- bhttp/latest/edge
override-build: |
snapcraftctl build
pip3 install vergit
vergit --format=json > $SNAPCRAFT_PART_INSTALL/charmstore-client-version
bhttp:
plugin: nil
stage-snaps:
- bhttp/latest/edge
stage:
- bin/bhttp
charm-tools:
source: .
plugin: python
python-version: python3
build-packages:
- libffi-dev
- libpython3.6-dev
- python3-pip
- rustc
- cargo
- pkg-config
stage-packages:
- git-core
- libssl-dev
- libffi-dev
- libpython3.6
- libpython3.6-minimal
- libpython3.6-stdlib
- libpython3-dev
- libpython3.6-dev
override-build: |
snapcraftctl build
pip3 install https://github.com/openstack-charmers/charm-templates-openstack/archive/master.zip#egg=charm_templates_openstack
sed -i "$SNAPCRAFT_PART_INSTALL/usr/lib/python3.6/site.py" -e 's/^ENABLE_USER_SITE = None$/ENABLE_USER_SITE = False/'
vergit --format=json > $SNAPCRAFT_PART_INSTALL/charm-tools-version
snapcraftctl set-version $(vergit)
# ensure we don't accidentally pick up system py2
ln -s python3 $SNAPCRAFT_PART_INSTALL/usr/bin/python || true
# copy our wrappers into the right place; note: we cannot use organize,
# because it will break things (see forum link below)
cp -R helpers/snap-wrappers $SNAPCRAFT_PART_INSTALL/bin/wrappers
stage:
# IMPORTANT! Only specify excludes here! Includes will break things!
# See: https://forum.snapcraft.io/t/python-classic-snap-confusion-frustration-core18-entry-point-scripts-organize-stage-prime-override-build/10317
# exclude unnecessary docs
- -usr/share/doc*
- -usr/share/lintian
- -usr/share/git-web
- -usr/share/man
- -usr/share/perl*
- -usr/share/pixmaps
# exclude the embedded pip, so we can replace it
- -lib/python*/site-packages/virtualenv_support/pip-*.whl
override-prime: |
snapcraftctl prime
# Work around python plugin forcibly excluding pip bins, even if they're
# explicitly added to stage. Also forcibly update the pip embedded in
# virtualenv to get the lsb_release fix that was released with pip 10.
cp $SNAPCRAFT_PART_INSTALL/bin/pip* bin/
python3 -m pip download pip -d lib/python*/site-packages/virtualenv_support/