This release is a pre-release and may not be stable for production use.
Debmagic
Modern, robust & easy tooling for building and packaging Debian/Ubuntu packages — while staying backwards compatible.
- Build any package in an isolated container environment with
debmagic build - Test and lint with
debmagic testanddebmagic check - Debug build environments interactively with
debmagic shell
Installation
pip install debmagic
or run it directly:
uvx debmagic
Quickstart
Build any Debian-packaged source tree in an isolated environment:
cd your-package
debmagic build binary --driver lxd \
--output-dir /tmp/build-artifacts
Pick a driver explicitly — there's no auto-detection:
| Driver | Check it's available | Isolation |
|---|---|---|
lxd / incus |
lxc list / incus list |
Full container isolation |
docker |
docker info |
Full container isolation |
bare |
none (no daemon) | None — only use in a disposable/CI environment |
Create a source package (.dsc) without compilation:
debmagic build source
Useful options
--distro <codename>— select the target distro/release (e.g.trixie,noble) if the changelog is ambiguous--persistent— retain the build environment for repeated attempts--incremental— sync only changed sources for faster rebuilds; implies--persistent--sign— GPG-sign the resulting.changes/.dsc/.buildinfowithdebsign--apt-mirror <url>— use a faster mirror for build-dependency resolution
Any of these can be persisted in a debmagic.toml config file instead of repeating CLI flags.
Inspecting a failed build
Failed builds tear down their environment by default. Build with --persistent up front, then attach an interactive shell inside the build environment:
debmagic shell
Documentation
For the full documentation — the build quick reference, packaging guides, configuration and module references — visit debmagic.readthedocs.io.
License
Released under the GNU General Public License version 2 or later.
Metadata
Release files for debmagic 0.0.1a7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| debmagic-0.0.1a7-py3-none-manylinux_2_39_x86_64.whl | Python 3 | none | Linux glibc 2.39+ x86-64 | Details |
Release files / debmagic-0.0.1a7-py3-none-manylinux_2_39_x86_64.whl
| Download URL | debmagic-0.0.1a7-py3-none-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Linux glibc 2.39+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
4a30facc10a92d084339ad90df83297244ab31f3267e81b72446282d2a9e9360
|
|
BLAKE2b-256 checksum How to use checksums |
27da81ca4f55bb4b68fda3585c424eaedceae2b645ffe0b6b967bc8f3ef8f37c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|