-
Notifications
You must be signed in to change notification settings - Fork 0
/
charmcraft.yaml
43 lines (43 loc) · 1.61 KB
/
charmcraft.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
type: charm
bases:
- name: ubuntu
channel: "22.04"
parts:
# This is one way to manipulate the build process. The 'nil' plugin means that
# it will just run whatever commands are specified and not do anything else.
# Note that the `charm` part should have `after: -mysqlclient-deps` to ensure
# that this runs first.
# mysqlclient-deps:
# plugin: nil
# override-build: |
# apt update && apt install pkg-config default-libmysqlclient-dev python3-dev build-essential
# This would be a way to get a locally built wheel into the build environment.
# From there, it could be used in the build process.
# mysqlclient-deps:
# source: wheels/
# plugin: dump
# prime:
# - mysqlclient-2.2.0-cp310-cp310-linux_x86_64.whl
charm:
# after:
# - mysqlclient-deps
prime:
- src/schema
- src/exim.config
build-packages:
# These are required to build mysqlclient
# Note that `libmysqlclient21` must also be installed on the container that
# will be importing MySQLdb.
# In practice, it would likely be better to use pymysql (pure Python) rather
# than have to do all of these workarounds.
- pkg-config
- default-libmysqlclient-dev
- python3-dev
- build-essential
# cryptography cannot be built on the Ubuntu base image (needs ffi),
# so install the binary first, rather than using an alternative base.
# Unlike mysqlclient, there is a Linux wheel available on PyPI, so there's
# no need to build from source, just to tell charmcraft that we trust this
# binary package.
charm-binary-python-packages:
- cryptography