charmcraftcache
Fast first-time builds for charmcraft
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 charmcraftcacheuv
uv add charmcraftcachepoetry
poetry add charmcraftcacheInstalling 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
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
charmcraftlocalPacks Juju charms with local Python package…
unclear · top 15,000 on PyPI
charm-refresh-build-versionWrites charm version information into…
unclear · top 15,000 on PyPI
cibuildwheelAutomates building and testing Python wheels…
permissive · top 5,000 on PyPI
soldrSoldr is a Python wrapper that downloads Rust…
permissive · top 15,000 on PyPI
nodejs-wheelDistributes Node.js prebuilt binaries as Python…
unclear · top 15,000 on PyPI
vercel-cacheProvides runtime cache helpers for Vercel…
permissive · top 5,000 on PyPI
nodejs-wheel-binariesDistributes Node.js prebuilt binaries as Python…
permissive · top 5,000 on PyPI
pyston-autoloadAutomatically loads and enables Pyston, a…
unclear · top 15,000 on PyPI
opsA Python framework for developing…
permissive · top 15,000 on PyPI
charmlibs-pathopsProvides a pathlib-like interface for reading…
permissive · top 15,000 on PyPI