charmcraft.yaml: Add missing build-packages

Not all supported architectures have binary wheels available on
PyPi.  For those architectures the wheels will be built from
source, and as such we need to add build system library
dependencies to allow the build to succeed.

Also set the MAKEFLAGS environment variable to allow the source
builds to use available processors for parallel compilation.

Add -p parameter to mkdir in the override-prime entry point
recipe in case the directory already exists.

Change-Id: I83d2a41167cfb96ee38fbb95987f4e6c36ce2753
This commit is contained in:
Frode Nordahl
2022-09-12 18:30:24 +02:00
parent 2986ceb67b
commit 65a2b4ec3a
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -7,6 +7,13 @@ parts:
- git
- python3-dev
- libffi-dev
- libssl-dev
- libxml2-dev
- libxslt1-dev
- rustc
- cargo
build-environment:
- MAKEFLAGS: -j$(nproc)
override-build: |
apt-get install ca-certificates -y
tox -e build-reactive
@@ -19,7 +26,7 @@ parts:
# hooks directory.
cp -r $CRAFT_STAGE/* .
# Charmcraft looks for this specific entry point.
mkdir src
mkdir -p src
ln -sf ../hooks/start src/charm.py
bases:
+1 -1
View File
@@ -42,7 +42,7 @@ commands =
[testenv:build-reactive]
basepython = python3
commands =
charm-build --log-level DEBUG --use-lock-file-branches --binary-wheels -o {toxinidir}/build/builds src {posargs}
charm-build --log-level DEBUG --use-lock-file-branches --binary-wheels-from-source -o {toxinidir}/build/builds src {posargs}
[testenv:add-build-lock-file]
basepython = python3