Skip to main content
Pre-release

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 test and debmagic 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/.buildinfo with debsign
  • --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.1a6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for debmagic 0.0.1a6
File Interpreter ABI Platform
debmagic-0.0.1a6-py3-none-manylinux_2_39_x86_64.whl Python 3 none Linux glibc 2.39+ x86-64 Details

Release files / debmagic-0.0.1a6-py3-none-manylinux_2_39_x86_64.whl

Download URL debmagic-0.0.1a6-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
ece78f1c982644343a04dd81d0dcaf502fc0275ca321a30b17bd8085f9bdc9c3
BLAKE2b-256 checksum
How to use checksums
19f240c4306b90e6b7ec9facee7b1e21e8b1d4d9a9a61af50f80a8a56232c21f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page