skillfed

charmcraftcache

Fast first-time builds for charmcraft

charmcraftcache v0.8.5 136.0K downloads/30d#11,411 on PyPI3
License unclear Active released

What it is and what it does

charmcraftcache addresses a specific bottleneck in charmcraft builds: by default, charmcraft builds Python package wheels from source rather than downloading pre-built wheels, which is slow on first build. The package works by downloading pre-built wheels from a centralized hub (maintained separately) and populating charmcraft's pip cache before packing, so subsequent builds reuse those wheels.

It is a CLI tool installed via pipx that wraps charmcraft's pack command. It requires charmcraft.yaml to use multi-base shorthand notation (where build-on and build-for are identical), and it works within charmcraft's LXC container model. The tool is most useful in CI environments and on fresh machines where the pip cache is empty.

Use it for:

  • Speed up CI charm builds by pre-populating the pip wheel cache with source-built wheels from a shared hub.
  • Reduce build time when contributing to a charm on a new development machine.
  • Cache wheels across multiple charm platform variants (e.g., ubuntu@22.04:amd64, ubuntu@24.04:arm64) in a single operation.
  • Avoid repeated source builds of the same Python dependencies across multiple charm projects.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Accelerates charmcraft builds by pre-downloading and caching Python wheels built from source, reducing first-time build times on new machines and CI runners.

Yes, if you build charms regularly and want faster first-time builds. The tool is actively maintained, has low install friction, and solves a real pain point in charmcraft workflows. The unclear license is a minor concern to verify before production use. Not relevant for non-charmcraft users.

Install

charmcraftcache on PyPI

pip

pip install charmcraftcache

uv

uv add charmcraftcache

poetry

poetry add charmcraftcache

Installing charmcraftcache

Before you install

Low friction install via pipx. Active maintenance with recent commits and no known vulnerabilities. Depends on common, stable packages (packaging, pyyaml, requests, rich, typer).

License in practice

License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Verify the actual license before use in proprietary or restricted contexts.

Quickstart

pipx install charmcraftcache
ccc add
ccc pack

Requires charmcraft.yaml to use multi-base shorthand notation syntax (e.g., 'ubuntu@22.04:amd64'); build-on/build-for syntax is not supported. Python >= 3.10 required.

Verify before relying

  • Whether the pre-built wheel cache is kept up-to-date for new charm releases and dependencies.
  • Performance improvement magnitude compared to standard charmcraft builds in typical CI scenarios.
  • Compatibility with charms using C extensions beyond pyyaml.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — packaging, pyyaml, requests, rich, typer
Maintenance actively maintained — 130 days since the last release
Last repo commit
First released
Downloads 135,975/month — #11,411 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: charmcraftcache-0.8.5-py3-none-any.whl

Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

charmcraft build cachecharm package build accelerationpython wheel cachingci build performancecharm dependency caching
charm-ecosystembuild-caching

More Build Tools packages