Registry / devops / deb-pkg-tools

deb-pkg-tools

JSON →
library8.4pypypi✓ verified 81d ago

A Python library for creating, inspecting, and manipulating Debian packages (.deb files). Version 8.4 is stable, with infrequent releases focused on maintenance.

pip install deb-pkg-tools
INSTALL
IMPORT
SIG · DEB-PKG-TOOLS
D
deb-pkg-tools
devopspythonv8.4
Install
1.9s avg
Import
Disk
19MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v8.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.9s · import 0.000s · 21MB
19MB installed
● package 19MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

debian_package_dependencies
from deb_pkg_tools import debian_package_dependencies
from deb_pkg_tools import DebPackage
generate_stdeb_cfg
from deb_pkg_tools import generate_stdeb_cfg

Basic usage: inspect an existing .deb or create a new one from a control dictionary.

from deb_pkg_tools.package import DebPackage # Load an existing .deb file pkg = DebPackage('path/to/package.deb') print(pkg.name, pkg.version) # Create a new basic package control = { 'Package': 'example', 'Version': '1.0', 'Architecture': 'all', 'Maintainer': 'Example <example@example.com>', 'Description': 'An example package' } new_pkg = DebPackage(control=control) new_pkg.write('example_1.0_all.deb')
Debug
Known issues
breakingVersion 8 changed the API: DebPackage constructor now requires keyword arguments (e.g., control=) instead of positional.
fix
Use DebPackage(control=control) instead of DebPackage(control).
affects: >=8.0,<9.0
gotchaWhen reading a .deb file, the control data is accessed via attributes (pkg.name) and not via a dictionary. Mixing up with DebPackage.control (the dict used at creation) can cause confusion.
fix
Use pkg.name, pkg.version, etc. For raw control data, use pkg._control_data (private).
affects: all
deprecatedThe function deb_pkg_tools.utils.read_control_file is deprecated in favour of DebPackage.from_control_file or the package constructor.
fix
Replace with DebPackage.from_control_file(control_path) if you have a control file.
affects: >=7.0,<9.0
Upgrade
Version history
8.4latest on PyPI · released Mar 9, 2021
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
20
OpenAI (training)
1
Resources
deb-pkg-tools — pip install deb-pkg-tools · libregistry