Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to build charm with binary wheels (#620)
The reactive framework was born in a time of the now legacy charm store. The legacy charm store did not have awareness for binary compatibility with various CPU architectures. In order to enable the use of Python virtual environments, and at the same time support multiple CPU architectures, the charm-tools build action currently uses `pip download` to retrieve the source code of Python dependencies. On charm install layer-basic will subsequently use pip to build and install the dependencies on the target. Over the recent years this approach has become increasingly difficult to maintain. The Python ecosystem has a plethora of build automation and package mangement projects, and each and every Python dependency makes their own choices about what to use. Adding to that, pip does not really support automatic discovery of build dependencies on download (ref pypa/pip#7863). Today the legacy charm store has been replaced by charmhub, which does have awareness of CPU architectures. The Launchpad build automation service has also gained support for charm recipes, which allow developers to build their charms accross a broad range of CPU architectures. To leverage these capabilities and relieve reactive charm maintainers of the duty of manually hunting down and compiling requirement files for build dependencies, this patch adds support for building charms using binary wheels. Allowing the user to specify that wheels should be built from source could be useful for detecting any missing build environment binary dependencies (C/Rust library packages etc). Signed-off-by: Frode Nordahl <frode.nordahl@canonical.com>
- Loading branch information